How does negate work?

Jason Frisvold frisvolj at lafayette.edu
Wed Apr 29 15:22:19 CEST 2009


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

I realize it sounds like a dumb question, but either I'm doing something
wrong, or my copy of negate is broken...  Shouldn't these return
different results?

[root at dev objects]$ /usr/local/nagios/libexec/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$
SNMP CRITICAL - *4* | iso.3.6.1.4.1.318.1.1.1.4.1.1.0=4

[root at dev objects]$ ../../libexec/negate
/usr/local/nagios/libexec/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$
SNMP CRITICAL - *4* | iso.3.6.1.4.1.318.1.1.1.4.1.1.0=4


If I understand correctly, the first command should return an OK if, and
only if, the value returned by the SNMP query is equal to 3.

Adding a negate to that means I should get an OK if the return is
anything except 3.

What am I missing here?

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

iEYEARECAAYFAkn4VIsACgkQO80o6DJ8Uvk5IACgholXco5z+s+Nh6M5w4Om3dG6
Z/8AniD6iitCm7r0qAvj6XuZfClA0FOB
=jf11
-----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