rvalitov / zabbix-php-fpm

PHP-FPM status monitoring template for Zabbix with auto discovery (LLD), support for multiple pools and ISPConfig
GNU General Public License v3.0
69 stars 20 forks source link
ispconfig php-fpm zabbix-templates

PHP-FPM Zabbix Template with Auto Discovery and Multiple Pools

Zabbix versions PHP PHP7 LLD ISPConfig Apache nginx Build Status CodeFactor

Banner

Main features

Provided Items

We capture only useful data from host and PHP-FPM status page:

History storage period is from 1 hour to 1 day (depends on specific item), trend storage period is 365 days that's optimal for environments with multiple websites. Data is captured every minute. These timings can be adjusted in template or per host if needed.

Provided Triggers

Title Severity Description
Too many connections on pool High It means this pool is under high load. Please, make sure that your website is reachable and works as expected. For high load websites with huge amount of traffic please manually adjust this trigger to higher values (default is 500 concurrent connections). For websites with low or standard amount of visitors you may be under DDoS attack. Anyway, please, check the status of your server (CPU, memory utilization) to make sure that your server can handle this traffic and does not have performance issues.
PHP-FPM uses too much memory Average Please, make sure that your server has sufficient resources to handle this pool, and check that the traffic of your website is not abnormal (check that your website is not under DDoS attack).
PHP-FPM detected slow request Warning PHP-FPM detected slow request on pool. A slow request means that it took more time to execute than expected (defined in the configuration of your pool). It means that your pool has performance issues: either it is under high load, your pool has non-optimal configuration, your server has insufficient resources, or your PHP scripts have slow code (have bugs or bad programming style). You need to set request_slowlog_timeout and slowlog options in your pool's configuration if you want to use this trigger. Otherwise the trigger will never be fired.
The queue utilization for pool reached 25% Warning The queue for this pool reached 25% of its maximum capacity. Items in queue represent the current number of connections that have been initiated on this pool, but not yet accepted. It typically means that all the available server processes are currently busy, and there are no processes available to serve the next request. Raising pm.max_children (provided the server can handle it) should help keep this number low. This trigger follows from the fact that PHP-FPM listens via a socket (TCP or file based), and thus inherits some of the characteristics of sockets. Low values of the listen queue generally result in performance issues of this pool. The queue length is defined by the backlog option in your pool's configuration.
The queue utilization for pool reached 50% Average The queue for this pool reached 50% of its maximum capacity. Items in queue represent the current number of connections that have been initiated on this pool, but not yet accepted. It typically means that all the available server processes are currently busy, and there are no processes available to serve the next request. Raising pm.max_children (provided the server can handle it) should help keep this number low. This trigger follows from the fact that PHP-FPM listens via a socket (TCP or file based), and thus inherits some of the characteristics of sockets. This pool already has performance issues. Please, check that your server has enough resources and adjust the configuration of this pool to handle more concurrent requests, otherwise you can suffer serious degraded performance. The queue length is defined by the backlog option in your pool's configuration.
The queue utilization for pool reached 85% High The queue for this pool reached 85% of its maximum capacity. Items in queue represent the current number of connections that have been initiated on this pool, but not yet accepted. It typically means that all the available server processes are currently busy, and there are no processes available to serve the next request. Raising pm.max_children (provided the server can handle it) should help keep this number low. This trigger follows from the fact that PHP-FPM listens via a socket (TCP or file based), and thus inherits some of the characteristics of sockets. This pool already has serious performance issues. Please, check that your server has enough resources and adjust the configuration of this pool to handle more concurrent requests, otherwise you can face severe errors when new requests can't be processed and will be rejected generating errors such as HTTP 500. The queue length is defined by the backlog option in your pool's configuration.
PHP-FPM manager changed Information The process manager of PHP-FPM for this pool has changed.

Provided Graphs

Connections

Zabbix PHP-FPM connections graph

Displays the following data:

CPU

Zabbix PHP-FPM CPU utilization graph

Displays the following data:

Memory

Zabbix PHP-FPM RAM utilization graph

Displays the following data:

Process

Zabbix PHP-FPM CPU utilization graph

Displays the following data:

Queue

Displays the following data:

Max Children Reached

Displays the following data:

Provided Screens

Screens are based on the graphs above:

Zabbix screens example

Installation and configuration

Please refer to Wiki.

Testing and Troubleshooting

Please refer to Wiki.

Compatibility

System requirements

Tested with: