snmp

umask umask at yandex.ru
Thu Mar 6 19:43:10 MSK 2008


А у вас случайно для cacti плагина нету?





06.03.08, 18:48, "Olexander Shtepa" <isk at idegroup.com>:

> snmpd.conf:

> exec nginx_requests  /etc/snmp/exec_nginx requests

> exec nginx_active    /etc/snmp/exec_nginx active

> exec nginx_keepalive /etc/snmp/exec_nginx keepalive

> exec nginx_accepts   /etc/snmp/exec_nginx accepts

> /etc/snmp/exec_nginx:

> #!/bin/sh

> function status(){

>     curl -s -m 10 http://host/stub_status

> }

> case "$1" in

>     requests)

>         status | awk 'FNR==3 {print $3}'

>     ;;

>     accepts)

>         status | awk 'FNR==3 {print $1}'

>     ;;

>     active)

>         status | awk '$1=="Active" {print $3}'

>     ;;

>     keepalive)

>         status | awk '$1=="Reading:" {print $6}'

>     ;;

>     *)

>         echo "Using: $0 requests|accepts|active|keepalive"

>         exit 1

> esac





More information about the nginx-ru mailing list