New announcements for Serverless, Network, RUM, and more from Dash! New announcements from Dash!


Agent Check Agent Check

Supported OS: Linux Mac OS Windows

PHP overview


The PHP-FPM check monitors the state of your FPM pool and tracks request performance.


Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the Autodiscovery Integration Templates for guidance on applying these instructions.


The PHP-FPM check is included in the Datadog Agent package, so you don’t need to install anything else on your servers that use PHP-FPM.


Edit the php_fpm.d/conf.yaml file, in the conf.d/ folder at the root of your Agent’s configuration directory. See the sample php_fpm.d/conf.yaml for all available configuration options:


  - status_url: http://localhost/status # or whatever pm.status_path is set to in your PHP INI
    ping_url: http://localhost/ping     # or whatever ping.path is set to in your PHP INI
    ping_reply: pong                    # the reply to expect from ping; default is 'pong'
 #  username: <YOUR_USERNAME> # if the status and ping URLs require HTTP basic auth
 #  password: <YOUR_PASSWORD> # if the status and ping URLs require HTTP basic auth
 #  http_host: <HOST>         # if your FPM pool is only accessible via a specific HTTP vhost
 #  tags:
 #    - instance:foo

Configuration Options:

  • status_url (Required) - URL for the PHP FPM status page defined in the fpm pool config file (pm.status_path)
  • ping_url (Required) - URL for the PHP FPM ping page defined in the fpm pool config file (ping.path)
  • use_fastcgi (Optional) - Communicate directly with PHP-FPM using FastCGI
  • ping_reply (Required) - Reply from the ping_url. Unless you define a reply, it is pong
  • username (Optional) - Used if basic authentication is set on the status and ping pages
  • password (Optional) - Used if basic authentication is set on the status and ping pages
  • http_host (Optional) - If your FPM pool is only accessible via a specific HTTP vhost, specify it here

Restart the Agent to start sending PHP-FPM metrics to Datadog.

Multiple pools

It is also possible to monitor multiple PHP-FPM pools using the same proxy server, a common scenario when running on Kubernetes.

To do so, you can modify your server’s routes to point to different PHP-FPM instances. Here is an example Nginx configuration:

server {

    location ~ ^/(status1|ping1)$ {
        access_log off;
        fastcgi_pass instance1_ip:instance1_port;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

    location ~ ^/(status2|ping2)$ {
        access_log off;
        fastcgi_pass instance2_ip:instance2_port;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

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.

Unix sockets

If your php-fpm installation uses unix sockets, you have to use the below syntax for status_url, ping_url and enable use_fastcgi:


  - status_url: unix:///path/to/file.sock/status
    ping_url: unix:///path/to/file.sock/ping
    ping_reply: pong
    use_fastcgi: true


Run the Agent’s status subcommand and look for php_fpm under the Checks section.

Data Collected


Size of the socket queue of pending connections
Total number of active processes
Shown as process
Total number of idle processes
Shown as process
Total number of processes
Shown as process
Total number of accepted requests
Shown as request
The number of times the process limit has been reached (when pm tries to start more children)
Shown as process
Total number of slow requests
Shown as request


The PHP-FPM check does not include any events.

Service Checks


Returns CRITICAL if the Agent cannot ping PHP-FPM at the configured ping_url, otherwise OK.


Need help? Contact Datadog support.

Mistake in the docs? Feel free to contribute!