SNMP Checking - Alert if a single value is detected

Jason Frisvold frisvolj at lafayette.edu
Fri May 1 19:43:45 CEST 2009


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

Patrick Morris wrote:
> Wrapper scripts are pretty handy for stuff like this, but there's not
> enough detail in the problem description to be much more specific than
> that.

I thought about writing a wrapper script, just wanted to make sure there
wasn't something (better) out there already..

*OH* ...  I figured it out.  Duh..  Should have tried this before.
Here's the behaviour I was looking for :

./check_snmp -H 10.0.0.1 -C public -o .1.3.6.1.4.1.318.1.1.1.4.1.1.0 -r
[^3]$

In other words, return an OK value UNLESS you get a 3 ...  The only
concern I have with this is that I can't figure out how to restrict this
to ONLY a 3.  As I see it, I believe it would match 3, 13, 23, etc.  If
I put a ^ at the beginning, though, it doesn't match properly..  But,
what I have is enough to start.

- --
- ---------------------------
Jason Frisvold
Network Engineer
frisvolj at lafayette.edu
- ---------------------------
"What I cannot create, I do not understand"
   - Richard Feynman
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkn7NNEACgkQO80o6DJ8UvkEiACgky8rUvTW5NXw+tIw+BUIy7RD
ZEgAnjcks7bFnInTnd6Kb6BAau+Wjyyr
=TgjM
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
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