Skip to content

Zabbix monitoring php-fpm

Debian 8

/etc/php5/fpm/pool.d/www.conf

pm.status_path = /status

/etc/nginx/conf.d/phpfpm-status.conf

server {

    listen 80;

    server_name phpfpm-status;

    keepalive_timeout 0;

    allow 127.0.0.1;
    allow ::1;
    deny all;

    location /status {
        include fastcgi_params;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    access_log off;
}

Checking

$ curl http://phpfpm-status/status
pool:                 www
process manager:      dynamic
start since:          517
accepted conn:        3
listen queue:         0
max listen queue:     0
listen queue len:     0
idle processes:       1
active processes:     1
total processes:      2
max active processes: 1
max children reached: 0
slow requests:        0