PHP-FPM
To enable metrics gathering, Bleemeo agent needs access to PHP-FPM status page and to know where it may find this page.
PHP-FPM needs to expose its status. For example the pool configuration should include:
pm.status_path = /statusBy defaults, Bleemeo agent try fcgi://<fpm-address>:<fpm-port>/status. E.g using FCGI over the
TCP port on which PHP-FPM listen and use “/status” path.
If it does not match your configuration, you will need to override
“stats_url” parameters by adding the following to /etc/glouton/conf.d/99-local.conf:
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" # See below for additional note on UNIX socket permission
# 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" # See below for additional note on UNIX socket permission
# For a PHP-FPM running in a Docker container - type: "phpfpm" instance: "CONTAINER_NAME" port: 9000 stats_url: "fcgi://my-server:9000/status"If using UNIX socket, you should make sure Glouton user has permission to access the socket.
This usually means that Glouton user should be member of the group running php-fpm, which is www-data
on Debian/Ubuntu system. Therefor sudo adduser glouton www-data and a restart of Bleemeo agent will grant access.
Agent gathers the following metrics:
| Metric | Description |
|---|---|
| service_status | Status of PHP-FPM |
| phpfpm_accepted_conn | Number of requests per second |
| phpfpm_active_processes | Number of active processes |
| phpfpm_idle_processes | Number of idle processes |
| phpfpm_listen_queue | Number of requests in the queue of pending connections |
| phpfpm_listen_queue_len | Size of the queue of pending connections |
| phpfpm_max_active_processes | Maximum number of active processes since FPM started |
| phpfpm_max_children_reached | Number of times the process limit has been reached |
| phpfpm_max_listen_queue | Maximum number of requests in the queue of pending connections since FPM started |
| phpfpm_slow_requests | Number of slow requests per second |
| phpfpm_start_since | Time spent since PHP-fpm start in seconds |
| phpfpm_total_processes | Number of idle + active processes |