1、nginx的status数值提取脚本 此脚本为 /usr/local/zabbix/bin/nginx\_status.sh 其内容如下: 2、php-fpm status数值提取脚本 php-fpm status数值提取脚本为 /usr/local/zabbix/bin/php\_fpm\_status.sh 内容如下: 五、创建zabbix_agentd的子配置文件 在 /usr/local/zabbix/etc/zabbix\_agentd.d/ 中创建...
php-fpm status数值提取脚本为/usr/local/zabbix/bin/php_fpm_status.sh,内容如下: 5创建zabbix_agentd的子配置文件 在/usr/local/zabbix/etc/zabbix_agentd.d/中创建关联nginx status和php-fpm status的子配置文件,创建一个,或者在已有的某配置文件中增加也可以,我这里分别为它们创建配置文件,文件名可自定义,...
function ping {/sbin/pidof nginx | wc -l } # 检测nginx性能 function active {/usr/bin/curl"http://$HOST:$PORT/nginx_status/"2>/dev/null| grep'Active'| awk'{print $NF}'} function reading {/usr/bin/curl"http://$HOST:$PORT/nginx_status/"2>/dev/null| grep'Reading'| awk'{print...
UserParameter=nginx.requests,/etc/zabbix/scripts/check_nginx_status.sh requests UserParameter=nginx.connections.active,/etc/zabbix/scripts/check_nginx_status.sh active UserParameter=nginx.connections.reading,/etc/zabbix/scripts/check_nginx_status.sh reading UserParameter=nginx.connections.writing,/etc/zabb...
location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; allow 10.1.12.0/24; deny all; } location ~ ^/(phpfpm_status)$ { include fastcgi_params; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; ...
查看nginx status nginx配置文件修改完成以后,使用nginx -t测试配置文件是否有明显逻辑及语法错误,没有问题则重载配置文件。 然后使用浏览器或者curl指令查看nginx status: 2.3 nginx status数值的含义说明 php-fpm自带的有用于查询其工作状态的页面,需要进行如下 两步,以启用这一功能。
1)nginx开启状态监控模块 [root@web01~23:58:28]# cat/etc/nginx/conf.d/nginx-status.oldben.conf server{listen8899;location/nginx_status{stub_status;}} 测试是否能取到值 [root@web01~01:54:05]# curl http://127.0.0.1:8899/nginx_status ...
php安装在/usr/local/php下,其相关配置文件及二进制执行程序都放置其中。 继续后面的操作前,请确认nginx和php-fpm的服务端口都处于监听状态。 2. 配置nginx的status 2.1 确认nginx的status已编译到程序包中 使用nginx -V可以查看nginx是否将模块·http_stub_status_module`编译进包中: ...
zabbix监控php-fpm主要是通过nginx配置php-fpm的状态输出页面,在正则取值.要nginx能输出php-fpm的状态首先要先修改php-fpm的配置,没有开启nginx是没有法输出php-fpm status。 1、修改文件php-fpm vim /application/php-5.5.32/etc/php-fpm.conf文件
2,编辑 Nginx 配置文件末尾添加如下配置 代码语言:javascript 代码运行次数:0 复制 Cloud Studio代码运行 location~^/(status|ping)${access_log off;allow192.168.99.185;deny all;fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;fastcgi_index index.php;include fastcgi_params;fastcgi_pass unix:/...