PHP FastCGI Process Manager (PHP-FPM) is an alternative FastCGI daemon for PHP that allows a website to handle high loads. PHP-FPM maintains pools (workers that can respond to PHP requests) to accomplish this. PHP-FPM is faster than traditional CGI-based methods, such as SUPHP, for multi-user PHP environments.

Available solutions

This template is for Zabbix version: 7.0




This template is developed to monitor the FastCGI Process Manager (PHP-FPM) by Zabbix that work without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.

The template PHP-FPM by Zabbix agent - collects metrics by polling PHP-FPM status-page with HTTP agent remotely.

Note that this solution supports HTTPS and redirects.


Zabbix version: 7.0 and higher.

Tested versions

This template has been tested on:

  • PHP 7
  • PHP 8


Zabbix should be configured according to the instructions in the Templates out of the box section.


Note that depending on your OS distribution, the PHP-FPM executable/service name can vary. RHEL-like distributions usually name both process and service as php-fpm, while for Debian/Ubuntu based distributions it may include the version, for example: executable name - php-fpm8.2, systemd service name - php8.2-fpm. Adjust the following instructions accordingly if needed.

  1. Open the PHP-FPM configuration file and enable the status page as shown.
pm.status_path = /status
ping.path = /ping
  1. Validate the syntax to ensure it is correct before you reload the service. Replace the <version> in the command if needed.
$ php-fpm -t


$ php-fpm<version> -t
  1. Reload the php-fpm service to make the change active. Replace the <version> in the command if needed.
$ systemctl reload php-fpm


$ systemctl reload php<version>-fpm
  1. Next, edit the configuration of your web server.

If you use Nginx, edit the configuration file of your Nginx server block (virtual host) and add the location block below it.

# Enable php-fpm status page
location ~ ^/(status|ping)$ {
## disable access logging for request if you prefer
access_log off;

## Only allow trusted IPs for security, deny everyone else
# allow;
# allow;    # your IP here
# deny all;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
## Now the port or socket of the php-fpm pool we want the status of
# fastcgi_pass unix:/run/php-fpm/your_socket.sock;

If you use Apache, edit the configuration file of the virtual host and add the following location blocks.

<LocationMatch "/status">
    Require ip
    # Require ip    # Your IP here
    # Adjust the path to the socket if needed
    ProxyPass "unix:/run/php-fpm/www.sock|fcgi://localhost/status"

<LocationMatch "/ping">
    Require ip
    # Require ip    # Your IP here
    # Adjust the path to the socket if needed
    ProxyPass "unix:/run/php-fpm/www.sock|fcgi://localhost/ping"
  1. Check the web server configuration syntax. The command may vary depending on the OS distribution and web server.
$ nginx -t


$ httpd -t


$ apachectl configtest
  1. Reload the web server configuration. The command may vary depending on the OS distribution and web server.
$ systemctl reload nginx


$ systemctl reload httpd


$ systemctl reload apache2
  1. Verify that the pages are available with these commands.
curl -L
curl -L

If you use another location of the status/ping pages, don't forget to change the {$PHP_FPM.STATUS.PAGE}/{$PHP_FPM.PING.PAGE} macro.

If you use another web server port or scheme for the location of the PHP-FPM status/ping pages, don't forget to change the macros {$PHP_FPM.SCHEME} and {$PHP_FPM.PORT}.

Macros used

Name Description Default

The port of the PHP-FPM status host or container.


Request scheme which may be http or https


The hostname or IP address of the PHP-FPM status for a host or container.


The path of the PHP-FPM status page.


The path of the PHP-FPM ping page.


The expected reply to the ping.


The maximum percent of the PHP-FPM queue usage for a trigger expression.



Name Description Type Key and additional info
Get ping page HTTP agent php-fpm.get_ping
Get status page HTTP agent php-fpm.get_status
Ping Dependent item


  • Regular expression: `{$PHP_FPM.PING.REPLY}($

Processes, active

The total number of active processes.

Dependent item php-fpm.processes_active


  • JSON Path: $.['active processes']


The current version of the PHP. You can get it from the HTTP-Header "X-Powered-By"; it may not work if you have changed the default HTTP-headers.

Dependent item php-fpm.version


  • Regular expression: ^[.\s\S]*X-Powered-By: PHP/([.\d]{1,}) \1

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 3h

Pool name

The name of the current pool.

Dependent item


  • JSON Path: $.pool

  • Discard unchanged with heartbeat: 3h


It indicates how long has this pool been running.

Dependent item php-fpm.uptime


  • JSON Path: $.['start since']

Start time

The time when this pool was started.

Dependent item php-fpm.start_time


  • JSON Path: $.['start time']

Processes, total

The total number of server processes currently running.

Dependent item php-fpm.processes_total


  • JSON Path: $.['total processes']

Processes, idle

The total number of idle processes.

Dependent item php-fpm.processes_idle


  • JSON Path: $.['idle processes']

Process manager

The method used by the process manager to control the number of child processes for this pool.

Dependent item php-fpm.process_manager


  • JSON Path: $.['process manager']

  • Discard unchanged with heartbeat: 3h

Processes, max active

The highest value of "active processes" since the PHP-FPM server was started.

Dependent item php-fpm.processes_max_active


  • JSON Path: $.['max active processes']

Accepted connections per second

The number of accepted requests per second.

Dependent item php-fpm.conn_accepted.rate


  • JSON Path: $.['accepted conn']

  • Change per second
Slow requests

The number of requests that has exceeded your request_slowlog_timeout value.

Dependent item php-fpm.slow_requests


  • JSON Path: $.['slow requests']

  • Simple change
Listen queue

The current number of connections that have been initiated but not yet accepted.

Dependent item php-fpm.listen_queue


  • JSON Path: $.['listen queue']

Listen queue, max

The maximum number of requests in the queue of pending connections since this FPM pool was started.

Dependent item php-fpm.listen_queue_max


  • JSON Path: $.['max listen queue']

Listen queue, len

The size of the socket queue of pending connections.

Dependent item php-fpm.listen_queue_len


  • JSON Path: $.['listen queue len']

Queue usage

The utilization of the queue.

Calculated php-fpm.listen_queue_usage
Max children reached

The number of times that pm.max_children has been reached since the PHP-FPM pool was started.

Dependent item php-fpm.max_children


  • JSON Path: $.['max children reached']

  • Simple change


Name Description Expression Severity Dependencies and additional info
Service is down last(/PHP-FPM by HTTP/ or nodata(/PHP-FPM by HTTP/,3m)=1 High Manual close: Yes
Version has changed

The PHP-FPM version has changed. Acknowledge to close the problem manually.

last(/PHP-FPM by HTTP/php-fpm.version,#1)<>last(/PHP-FPM by HTTP/php-fpm.version,#2) and length(last(/PHP-FPM by HTTP/php-fpm.version))>0 Info Manual close: Yes
Failed to fetch info data

Zabbix has not received any data for items for the last 30 minutes.

nodata(/PHP-FPM by HTTP/php-fpm.uptime,30m)=1 Info Manual close: Yes
Depends on:
  • Service is down
Pool has been restarted

Uptime is less than 10 minutes.

last(/PHP-FPM by HTTP/php-fpm.uptime)<10m Info Manual close: Yes
Manager changed

The PHP-FPM manager has changed. Acknowledge to close the problem manually.

last(/PHP-FPM by HTTP/php-fpm.process_manager,#1)<>last(/PHP-FPM by HTTP/php-fpm.process_manager,#2) Info Manual close: Yes
Detected slow requests

The PHP-FPM has detected a slow request.
The slow request means that it took more time to execute than expected (defined in the configuration of your pool).

min(/PHP-FPM by HTTP/php-fpm.slow_requests,#3)>0 Warning
Queue utilization is high

The queue for this pool has reached {$PHP_FPM.QUEUE.WARN.MAX}% of its maximum capacity.
Items in the queue represent the current number of connections that have been initiated on this pool but not yet accepted.

min(/PHP-FPM by HTTP/php-fpm.listen_queue_usage,15m) > {$PHP_FPM.QUEUE.WARN.MAX} Warning


Please report any issues with the template at

You can also provide feedback, discuss the template, or ask for help at ZABBIX forums

Articles and documentation

+ Propose new article

Didn't find integration you need?