[Nagiosplug-help] nagios/plugins/check_snmp syntax

Thomas Guyot-Sionnest dermoth at aei.ca
Fri Sep 12 05:39:04 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/09/08 08:14 AM, Smirnoff Alexander wrote:
> Hello!
> 
>  
> 
> I read nagios/plugins/check_snmp manual and make this request:
> 
> /usr/lib/nagios/plugins/check_snmp -H testhost -C spbmenro -o
> 1.3.6.1.4.1.2272.1.42.5.1.2.2 -P 2c -c 12 -w 01
> 
> e.g. 1.3.6.1.4.1.2272.1.42.5.1.2.2 OID have 3 states:
> 
> 0 – critical
> 
> 1 – normal
> 
> 2 – warning
> 
>  
> 
> But I recive wrong state from check_snmp:
> 
>  
> 
> [root at spbmon asmirnov]# /usr/lib/nagios/plugins/check_snmp -H testhost
> -C spbmenro -o 1.3.6.1.4.1.2272.1.42.5.1.2.1 -P 2c -c 1,2 -w 0,1
> 
> SNMP WARNING - *1* | iso.3.6.1.4.1.2272.1.42.5.1.2.1=1 
> 
>  
> 
> May be I must use another syntax?

In check_snmp commas are used to separate multiple thresholds when
checking multiple OIDs at once. What you're looking for is a colon (:).

See the help output (check_snmp --help) for more details.

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIyeRY6dZ+Kt5BchYRArh3AKDV96HoI43J7W1gXWQLnXungl/5lgCcCj3v
7e/G39WAYTAuPYUD8Fq6sC4=
=u6+E
-----END PGP SIGNATURE-----




More information about the Help mailing list