check_snmp disk space monitoring

David Dyer-Bennet dd-b at dd-b.net
Wed Feb 17 20:45:17 CET 2010


I'm playing with using check_snmp to look at disk space, with commands
(working from the command line so far) like:

/usr/lib/nagios/plugins/check_snmp -C public -P 2c -H localhost -o
dskErrorMsg.2 -r '^\s*$'

([[:space:]] doesn't work any better than \s either)

I'm trying to monitor the error message rather than the simple flag so
that the data returned will include the error when one is found.  I'm
trying to use the regex capability to to match an empty error message; so
that anything non-empty will be reported as an error.

And I'm not getting anywhere.  I'm mostly pretty good with regexps, but
despite claiming in --help to support "extended regular expressions", it
doesn't seem to.  In particular the "^" for beginning of text and "$" for
end of text don't seem to be working.

Clues!  Clues for the poor!

Is this a basically stupid approach, by the way?

Oh, and how does -r work with multiply OIDs in -o?  What's the syntax for
providing multiple -r values, and what happens if you only provide one?


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


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
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