Page 1 of 1
Setting Negative Thresholds
Posted: Mon Feb 13, 2017 4:14 pm
by nbradshaw45
Hi -
I have a value of -31.2 . I need to monitor when this threshold is < -35 (Meaning anything that is a lower negate number than -35..ie..-36-,-37..etc)
Below I am using positive thresholds just to show the output...but I need to use Negative Thresholds instead.
./check_snmp -H 10.20.101.XXX -C XXX -o .1.3.6.1.4.1.2378.1.1.2.2.2.2.1.1.5.1 -w 2 -c 4
SNMP CRITICAL - *-31.2* | iso.3.6.1.4.1.2378.1.1.2.2.2.2.1.1.5.1=-31.2;2;4;
Re: Setting Negative Thresholds
Posted: Mon Feb 13, 2017 4:27 pm
by rkennedy
Some plugins support it, and some do not. If they do, take a look at this section which mentions how to use negative thresholds -
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
Re: Setting Negative Thresholds
Posted: Mon Feb 13, 2017 4:29 pm
by bwallace
One method which appeared to work was posted by DiegoAnjos in this forum:
https://support.nagios.com/forum/viewto ... 20&t=33752
Re: Setting Negative Thresholds
Posted: Tue Feb 14, 2017 11:51 am
by nbradshaw45
I tried the plugin as suggested - this is not working. Any other suggestions?
Re: Setting Negative Thresholds
Posted: Tue Feb 14, 2017 1:22 pm
by rkennedy
Did you try setting the parameters according to the SNMP guide I posted? It should work with those, by using :
Re: Setting Negative Thresholds
Posted: Tue Feb 14, 2017 3:33 pm
by nbradshaw45
I was able to do this by doing: -w=-32: -c=-80:
Re: Setting Negative Thresholds
Posted: Tue Feb 14, 2017 3:34 pm
by rkennedy
Awesome - not all plugins will have that support, but most should I believe. Are we good to mark this thread resolved then?
Re: Setting Negative Thresholds
Posted: Tue Feb 14, 2017 3:38 pm
by nbradshaw45
Yes - Resolved. Thanks.
Re: Setting Negative Thresholds
Posted: Tue Feb 14, 2017 3:51 pm
by rkennedy
/closed
Feel free to mark a new thread if you have questions in the future!