zabbix监控nginx

  sre
#nginx
UserParameter=nginx_status.active,curl http://127.0.0.1/nginx_status  2>/dev/null |grep 'Active' |awk '{print 3}'  
UserParameter=nginx_status.reading,curl http://127.0.0.1/nginx_status  2>/dev/null |grep 'Reading' |awk '{print2}'
UserParameter=nginx_status.writing,curl http://127.0.0.1/nginx_status  2>/dev/null |grep 'Writing' |awk '{print 4}'
UserParameter=nginx_status.waiting,curl http://127.0.0.1/nginx_status  2>/dev/null |grep 'Waiting' |awk '{print6}'
UserParameter=nginx_status.accepts,curl http://127.0.0.1/nginx_status  2>/dev/null |awk NR==3 |awk '{print 1}'
UserParameter=nginx_status.handled,curl http://127.0.0.1/nginx_status  2>/dev/null |awk NR==3 |awk '{print2}'
UserParameter=nginx_status.requests,curl http://127.0.0.1/nginx_status  2>/dev/null |awk NR==3 |awk '{print $3}'

模板:



    3.2
    2017-03-28T10:13:15Z
    
        
            nginx
        
    
    
        
    


LEAVE A COMMENT

Captcha Code