[Nagiosplug-help] nagios/plugins/check_snmp syntax

Smirnoff Alexander asmirnoff at office.beeline.ru
Fri Sep 12 13:17:29 CEST 2008


Thanks a lot! Check_snmp now make correct output:

[root at spbmon asmirnov]# /usr/lib/nagios/plugins/check_snmp -H p8610 -C
public -o 1.3.6.1.4.1.2272.1.42.5.1.2.4 -P 2c -c 1:2 -w 0:1
SNMP WARNING - *2* | iso.3.6.1.4.1.2272.1.42.5.1.2.4=2

, but after nagios restart services again maked incorrect:

[09-12-2008 14:17:40] SERVICE ALERT:
p8606;RPR248-1:;CRITICAL;HARD;1;SNMP CRITICAL - *2*

SNMP CRITICAL instead of SNMP WARNING.

-----Original Message-----
From: Thomas Guyot-Sionnest [mailto:dermoth at aei.ca] 
Sent: Friday, September 12, 2008 7:39 AM
To: Smirnoff Alexander
Cc: nagiosplug-help at lists.sourceforge.net.
Subject: Re: [Nagiosplug-help] nagios/plugins/check_snmp syntax

-----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