check_snmp disk space monitoring
Jim Avery
jim at jimavery.me.uk
Wed Feb 17 21:40:11 CET 2010
On 17 February 2010 19:45, David Dyer-Bennet <dd-b at dd-b.net> wrote:
>
> 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?
I think you're maybe a bit ambitious using check_snmp for disk space.
I recommend you use check_snmp_storage.pl which you will find at
http://nagios.manubulon.com/snmp_storage.html
hth,
Jim
------------------------------------------------------------------------------
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