zabbixモニタnginx status
1345 ワード
http://qicheng0211.blog.51cto.com/3958621/1557695
1.nginx
location /nginx_status{
stub_status on;
access_log off;
allow 127.0.0.1;
# “nginx ” nginx status
allow 192.168.0.1;
deny all;
}
2.curl http://xx/nginx_status
Active connections: 1
server accepts handled requests
16672 16672 16769
Reading: 0 Writing: 1 Waiting: 0
## Active connections:
## Server accepts handled requests: Nginx 1 , 1 ( ), 1
## Reading: Nginx Header
## Writing: Nginx Header
## Waiting: keep-alive , active - ( reading + writing ), Nginx ,
## , ,Waiting 。 reading + writing , ,
3. nginx
4.
/usr/local/bin/zabbix_get -s xx -k 'nginxSiteDiscovery'
/usr/local/bin/zabbix_get -s xx -k 'getNginxStatus[xx,domian]'
5. , 。