PHP-FPM
Bleemeo monitors PHP-FPM through automatic service detection and built-in metrics gathered from the PHP-FPM status page.
Auto-Detection
Section titled “Auto-Detection”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 = /statusBy 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:
sudo adduser glouton www-dataIf the auto-detected parameters are incorrect or the default status URL does not match your configuration, you can override them manually.
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"EOFCreate or edit C:\ProgramData\glouton\conf.d\99-php-fpm.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"
# 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"Built-in Metrics
Section titled “Built-in 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 and active processes |