PHP-FPM
Monitor PHP-FPM queue pressure, worker pool saturation, and request throughput from the local FastCGI status endpoint. The agent connects directly to PHP-FPM over FastCGI and reads the status page in JSON format to surface backlog, concurrency, and slow-request behavior.
Setup
Preparing PHP-FPM for monitoring requires enabling the pool status endpoint and exposing it on the default local FastCGI listener used by the agent.
- Enable the status endpoint: In the PHP-FPM pool you want to monitor, set
pm.status_path = /status. - Expose FastCGI locally: Ensure the pool listens on
127.0.0.1:9000, which is the address currently used by auto-discovery. - Restart PHP-FPM: Reload the service to apply the new pool configuration, for example
sudo systemctl restart php8.2-fpm. - Restart the agent: Restart
simobto trigger service discovery for the new endpoint:sudo systemctl restart simob. - Enable in UI: Once discovered, explicitly enable the PHP-FPM collector in your dashboard’s server configuration panel.
Example pool configuration:
[www]
listen = 127.0.0.1:9000
pm.status_path = /status
Configuration
The agent automatically discovers PHP-FPM when the status page is exposed through FastCGI on 127.0.0.1:9000 with the path /status and the JSON status format enabled through the ?json query string. No additional agent configuration is required for standard installations.
Metrics
The following metrics are collected from the PHP-FPM status output:
| Metric | Type | Unit | Description |
|---|---|---|---|
phpfpm_listen_queue_total | Gauge | - | Number of requests currently waiting in the listen queue. |
phpfpm_max_listen_queue_total | Gauge | - | Highest queue depth reached since PHP-FPM started. |
phpfpm_listen_queue_length_total | Gauge | - | Maximum number of requests the listen queue can hold. |
phpfpm_idle_processes_total | Gauge | - | Number of idle worker processes ready to handle requests. |
phpfpm_active_processes_total | Gauge | - | Number of worker processes currently serving requests. |
phpfpm_processes_total | Gauge | - | Total number of PHP-FPM worker processes. |
phpfpm_max_active_processes_total | Gauge | - | Highest number of simultaneously active workers since startup. |
phpfpm_accepted_connections_rate | Gauge | conns/s | Rate of accepted FastCGI connections per second. |
phpfpm_max_children_reached_total | Counter | total | Number of times the pool hit its configured worker limit. |
phpfpm_slow_requests_rate | Gauge | reqs/s | Rate of requests marked as slow per second. |
Troubleshooting
Verify the endpoint
If the cgi-fcgi utility is installed, you can manually query the status endpoint over FastCGI:
SCRIPT_NAME=/status \
SCRIPT_FILENAME=/status \
REQUEST_METHOD=GET \
QUERY_STRING=json \
cgi-fcgi -bind -connect 127.0.0.1:9000
The response should include a JSON payload with fields such as listen queue, active processes, and slow requests.
Discovery requirements
If PHP-FPM is not appearing in the UI, verify that:
- the pool is listening on
127.0.0.1:9000 pm.status_pathis set to/status- the agent was restarted after the PHP-FPM configuration changed
Current auto-discovery only supports the default TCP listener and status path above.