Skip to content
BleemeoBleemeo

PHP-FPM

Auto-Detection
Built-in Metrics

Bleemeo monitors PHP-FPM through automatic service detection and built-in metrics gathered from the PHP-FPM status page.

Glouton automatically detects PHP-FPM instances running on the host. To enable metrics gathering, PHP-FPM must expose its status page. Add the following to your pool configuration:

pm.status_path = /status

By default, Glouton accesses the status page at fcgi://<fpm-address>:<fpm-port>/status using FastCGI over the TCP port PHP-FPM listens on.

If using a UNIX socket, ensure the Glouton user has permission to access the socket. On Debian/Ubuntu, add the Glouton user to the www-data group:

Terminal window
sudo adduser glouton www-data

If the auto-detected parameters are incorrect or the default status URL does not match your configuration, you can override them manually.

Terminal window
sudo tee /etc/glouton/conf.d/99-php-fpm.conf > /dev/null << 'EOF'
service:
# For a PHP-FPM running outside a container
- type: "phpfpm"
address: "127.0.0.1"
port: 9000
stats_url: "fcgi://127.0.0.1:9000/status"
# For UNIX socket access, use:
# stats_url: "/var/run/php5-fpm.sock"
# For an additional PHP-FPM running outside a container
- type: "phpfpm"
instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE"
address: "127.0.0.1"
port: 9001
stats_url: "fcgi://127.0.0.1:9001/status"
# For UNIX socket access, use:
# stats_url: "/var/run/php5-fpm2.sock"
# For a PHP-FPM running in a Docker container
- type: "phpfpm"
instance: "CONTAINER_NAME"
port: 9000
stats_url: "fcgi://my-server:9000/status"
EOF
MetricDescription
service_statusStatus of PHP-FPM
phpfpm_accepted_connNumber of requests per second
phpfpm_active_processesNumber of active processes
phpfpm_idle_processesNumber of idle processes
phpfpm_listen_queueNumber of requests in the queue of pending connections
phpfpm_listen_queue_lenSize of the queue of pending connections
phpfpm_max_active_processesMaximum number of active processes since FPM started
phpfpm_max_children_reachedNumber of times the process limit has been reached
phpfpm_max_listen_queueMaximum number of requests in the queue of pending connections since FPM started
phpfpm_slow_requestsNumber of slow requests per second
phpfpm_start_sinceTime spent since PHP-FPM start in seconds
phpfpm_total_processesNumber of idle and active processes