check_snmp -s (and -r) not working

Fournier, Wim wfournier at comscore.com
Fri Mar 16 15:02:47 CET 2012


Don't know if you've solved this already. For integer values, I use -c x:x
The regexp and string (-s) matches expect a string and return OK if
otherwise.

--

Wim Fournier   Senior Technical Appl. Administrator   |  comScore, Inc.
(NASDAQ:SCOR)
t +31 (0)20 5195476   |   f +31 (0)20 6953786   |   w.fournier at nedstat.com
...........................................................................
............
comScore
Measuring the Digital World
Nedstat is now part of comScore
www.comscore.com
www.nedstat.nl





On 2/20/12 11:29 PM, "David Dyer-Bennet" <dd-b at dd-b.net> wrote:

>Using check_snmp v1.4.15 (nagios-plugins 1.4.15)
>
>[ddb at prc-mn-lnx01 dev]$ /usr/lib64/nagios/plugins/check_snmp  -H
>192.168.1.254 -C XXXXXX -o 1.3.6.1.2.1.2.2.1.8.10125 -l ifOperStatus  -s
>"loser" -v
>/usr/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv] 192.168.1.254:161
>1.3.6.1.2.1.2.2.1.8.10125
>iso.3.6.1.2.1.2.2.1.8.10125 = INTEGER: 2
>SNMP OK - ifOperStatus 2 | ifOperStatus=2
>
>I'm trying to check an OID value that isn't range-related,
>ifOperStatus.<port>.  As you see, I'm getting back the enum value that
>means "down".  This does NOT in any way match the -s string I supplied.
>I'm still getting an "OK" return value.
>
>(Obviously it's easy to wrap this with a script that finds the
>"ifOperStatus=<int>" and returns what I need.  I'll do that if I have to.)
>
>But...am I misunderstanding what the -s switch does?  Or is the -s switch
>completely non-functional in this version?  (I've read about a change
>rolled back to restore 1.4.14 behavior, but I didn't read the description
>as saying the string matching was completely non-functional before that.)
>
>I've also tried -r for regexps, same results; they seem to be completely
>ignored.
>-- 
>David Dyer-Bennet, dd-b at dd-b.net; http://dd-b.net/
>Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
>Photos: http://dd-b.net/photography/gallery/
>Dragaera: http://dragaera.info
>
>
>--------------------------------------------------------------------------
>----
>Try before you buy = See our experts in action!
>The most comprehensive online learning library for Microsoft developers
>is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>Metro Style Apps, more. Free future releases when you subscribe now!
>http://p.sf.net/sfu/learndevnow-dev2
>_______________________________________________
>Nagios-users mailing list
>Nagios-users at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/nagios-users
>::: Please include Nagios version, plugin version (-v) and OS when
>reporting any issue.
>::: Messages without supporting info will risk being sent to /dev/null
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5527 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120316/8fc100da/attachment.bin>
-------------- next part --------------
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list