[Nagiosplug-help] How to use negate plugin

jeff vier boinger at tradingtechnologies.com
Wed Dec 1 07:06:06 CET 2004


On Wed, 2004-12-01 at 04:55 -0600, Zoran Milenkovic wrote:
> Is there anybody who uses negate Nagios plugin for inverting plugin
> check 
> results? Would somebody like to share any example of negate plugin
> usage 
> or give any sugestions?
> 
> I've tryed the following but results are simply the same :-( just as 
> negate doesnt exist:
> 
> 
> root at monitor:~# su
> nagios                                                                                                     
> 
> sh-2.05b$
> 
> sh-2.05b$ /usr/local/nagios/libexec/negate -V 
> negate (nagios-plugins 1.4.0alpha1) 1.13
> 
> sh-2.05b$ /usr/local/nagios/libexec/negate 
> "/usr/local/nagios/libexec-1.3.1/check_snmp -H 10.0.0.254 -C public 
> -v 1 -o 1.3.6.1.2.1.1.3.0 -w 300 -c 600"
> 
> /usr/local/bin/snmpget -t 1 -r 9 -m ALL -v 1 -c public 10.0.0.254:161 
> 1.3.6.1.2.1.1.3.0 
> RFC1213-MIB::sysUpTime.0 = Timeticks: (130293500) 15 days, 1:55:35.00
> 
> SNMP CRITICAL - *130293500*
> 
> sh-2.05b$ /usr/local/nagios/libexec-1.3.1/check_snmp -H 10.0.0.254 -C 
> public -v 1 -o 1.3.6.1.2.1.1.3.0 -w 100 -c 200 
> /usr/local/bin/snmpget -t 1 -r 9 -m ALL -v 1 -c public 10.0.0.254:161 
> 1.3.6.1.2.1.1.3.0 
> RFC1213-MIB::sysUpTime.0 = Timeticks: (130295100) 15 days, 1:55:51.00
> 
> SNMP CRITICAL - *130295100*

negate is inverting the return code.  try 'echo $?' right after you run
the command.





More information about the Help mailing list