# Metricbeat php\_fpm read sockets multiple pools

**URL:** https://discuss.elastic.co/t/metricbeat-php-fpm-read-sockets-multiple-pools/305340
**Category:** Beats
**Tags:** metricbeat
**Created:** [May 22, 2022, 1:17am UTC](https://discuss.elastic.co/t/metricbeat-php-fpm-read-sockets-multiple-pools/305340 "2022-05-22T01:17:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rbos](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@rbos](https://discuss.elastic.co/u/rbos)
#### Post date: [May 22, 2022, 1:17am UTC](https://discuss.elastic.co/t/metricbeat-php-fpm-read-sockets-multiple-pools/305340/1 "2022-05-22T01:17:21Z")

</div>

Hi,

I have php-fpm installed on servers configured with multiple pools; I've set them to point to unix socket files, instead of HTTP, so like in the php-fpm.d files:

`listen = /var/run/php-fpm/php-fpm-web.sock`

I can fairly easily configure apache to point to one of these with a proxy invocation:

\<LocationMatch "/fpm-status-$POOL"\>  
Require ip 127.0.0.1 ::1  
ProxyPass unix:/var/run/php-fpm/php-fpm-web.sock|fcgi://localhost/fpm-status-$POOL

The php\_fpm module can be configured for multiple ports, but not multiple `status_path`s.

Do I have to rework my infrastructure to use network ports to query php-fpm status, or is it possible to set up metricbeat to use multiple hosts?

It would be even better if metricbeat could directly open and query the socket, rather than having to proxy through Apache.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 19, 2022, 3:17am UTC](https://discuss.elastic.co/t/metricbeat-php-fpm-read-sockets-multiple-pools/305340/2 "2022-06-19T03:17:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
