init_config:instances:## @param status_url - string - required## Get metrics from your FPM pool with this URL## The status URLs should follow the options from your FPM pool## See http://php.net/manual/en/install.fpm.configuration.php## * pm.status_path## You should configure your fastcgi passthru (nginx/apache) to catch these URLs and## redirect them through the FPM pool target you want to monitor (FPM `listen`## directive in the config, usually a UNIX socket or TCP socket.#- status_url:http://localhost/status## @param ping_url - string - required## Get a reliable service check of your FPM pool with `ping_url` parameter## The ping URLs should follow the options from your FPM pool## See http://php.net/manual/en/install.fpm.configuration.php## * ping.path## You should configure your fastcgi passthru (nginx/apache) to## catch these URLs and redirect them through the FPM pool target## you want to monitor (FPM `listen` directive in the config, usually## a UNIX socket or TCP socket.#ping_url:http://localhost/ping## @param use_fastcgi - boolean - required - default: false## Communicate directly with PHP-FPM using FastCGI#use_fastcgi:false## @param ping_reply - string - required## Set the expected reply to the ping.#ping_reply:pong
It is possible to monitor multiple PHP-FPM pools using the same proxy server, a common scenario when running on Kubernetes. To do so, modify your server’s routes to point to different PHP-FPM instances. Here is an example NGINX configuration:
If you find this approach too tedious at scale, setting use_fastcgi to true instructs the check to bypass any proxy servers and communicate directly with PHP-FPM using FastCGI. The default port is 9000 for when omitted from status_url or ping_url.
If your PHP-FPM installation uses unix sockets, you have to use the below syntax for status_url, ping_url and enable use_fastcgi:
Parameter
Value
status_url
unix:///<FILE_PATH>.sock/status
ping_url
unix:///<FILE_PATH>.sock/ping
ping_reply
pong
use_fastcgi
true
Note: With Autodiscovery, if the Agent runs in a separate container/task/pod, it doesn’t have access to the Unix sockets file of your FPM pool. It order to address this, run the Agent as a sidecar.