ngx_http_stub_status_module

Andrey Y. Ostanovsky andrey at ostanovsky.spb.ru
Wed Apr 5 17:11:10 MSD 2006


Max Chernogor wrote:
> Подскажите как пользоваться модулем
> ngx_http_stub_status_module
> Хочу прикрутить сбор статистики как описано
> тут http://www.dreamcatcher.ru/docs/nginx-netbsd.html
> Конкретно не работает вот такой запрос http://$fqdn/nginx_status
>
> nginx 1.35 ставил из портов FreeBSD
        location = /nginx_status {
                stub_status on;
                access_log   off;
                allow 192.168.2.1;
                allow 127.0.0.1;
                deny all;
        }

Ну, а в скрипте что-то типа:
# Reading: 0 Writing: 7 Waiting: 190
/usr/local/bin/lynx --dump http://${HOST_NAME}/nginx_status|\
              awk '/Active connections/ {active = int($NF)} \
              /Reading:/ {reading = int($2); writing = int($4); waiting
= int($NF)} \
              END{ \
              print "active.value", active;
              print "reading.value", reading;
              print "writing.value", writing;
              print "waiting.value", waiting;
              }'

-- 
Best regards, Andrey Y. Ostanovsky
St. Petersburg



More information about the nginx-ru mailing list