⑨.zabbix监控php-fpm

1.修改php-fpm配置文件

pm.status_path = /fpm-status

重启php-fpm服务 systemctl restart php-fpm

2.修改nginx配置文件

[root@rstx-43 conf.d]# cat localhost.conf 
server {
        listen       80;
        server_name  192.168.1.43;
        access_log   /var/log/nginx/yum_access.log main;
        error_log /var/log/nginx/yum_error.log warn;
        autoindex_localtime on;
        autoindex on;
        charset    UTF-8;
        root   /data/docker/yum;
        index  index.html index.htm;
        location /status {
           stub_status on;
           access_log off;
        }
        location /fpm-status {
           fastcgi_pass 127.0.0.1:9000;
           fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
           include fastcgi_params;
        }
}

测试

php状态指标含义

pool:                 www                           #状态池的名称
process manager:      dynamic                       #动态调整
start time:           21/Aug/2022:15:38:41 +0800    
start since:          6
accepted conn:        1                             #当前池的连接数
listen queue:         0                             #当前池的队列 如果这个数值不为0,那么则需要增加“FPM”的进程数量(可以添加触发器)
max listen queue:     0                             #请求队列最高的数量
listen queue len:     511                           #socket等待队列长度
idle processes:       4                             #空闲的进程数量
active processes:     1                             #活跃的进程数量
total processes:      5                             #总进程的数量
max active processes: 1                             #最大活跃进程数量(fpm启动开始计算)
max children reached: 0                             #超过最大进程数的峰值的次数,如果不为0,需要调整进程的最大活跃进程数量
slow requests:        0
posted @ 2022-08-21 16:52  老夫聊发少年狂88  阅读(64)  评论(0编辑  收藏  举报