Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


   


   


   















      :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: snmp



     cacti  ?





06.03.08, 18:48, "Olexander Shtepa" <isk@xxxxxxxxxxxx>:

> 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


  • References:
    • snmp
      • From: Vasiliy G Tolstov

 




Copyright © Lexa Software, 1996-2009.