INT 21h

Hi, I am Vladimir Smagin, sysadmin. Telegram Email GPG

Zabbix: nginx stub_status monitoring

№ 9029 В разделе "Администрирование" от June 15th, 2018,

In your server section:

    location / {
        allow 127.0.0.1; #allow only local agent
        deny all;
        stub_status on;
        access_log off;
    }

In zabbix_agentd.d/nginx.conf:

UserParameter=nginx.active[*],wget -O- -q $1 | awk '/^Active/ {print $NF}'
UserParameter=nginx.reading[*],wget -O- -q $1 | awk '/Reading/ {print $$2}'
UserParameter=nginx.writing[*],wget -O- -q $1 | awk '/Writing/ {print $$4}'
UserParameter=nginx.waiting[*],wget -O- -q $1 | awk '/Waiting/ {print $$6}'
UserParameter=nginx.accepted[*],wget -O- -q $1 | awk '/^[ \t]+[0-9]+[ \t]+[0-9]+[ \t]+[0-9]+/ {print $$1}'
UserParameter=nginx.handled[*],wget -O- -q $1 | awk '/^[ \t]+[0-9]+[ \t]+[0-9]+[ \t]+[0-9]+/ {print $$2}'
UserParameter=nginx.requests[*],wget -O- -q $1 | awk '/^[ \t]+[0-9]+[ \t]+[0-9]+[ \t]+[0-9]+/ {print $$3}'

Нет комментариев »

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Яндекс.Метрика