Invert alarms

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jmgallardo
Posts: 3
Joined: Tue Dec 06, 2011 2:51 pm

Invert alarms

Post by jmgallardo »

Hi everybody,
I know how to configure Nagios to notify each time the program detect a value higher than a threshold.
Do you know if is possible to do the opossite? I need to receive an alarm if a value is lower than a threshold.

For example, I need to receive an alarm if the uptime received by snmp, is lower than 10 seconds, or if a temperature for a room is lower than 16 degrees (the temperature is measured by snmp).

Regards.
crfriend
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)
Contact:

Re: Invert alarms

Post by crfriend »

Check the "check_snmp" syntax (check_snmp -h) and query for the single OID that describes what value you're looking for and set the thresholds accordingly. If you're making a decision based on a slew of OIDs, it's usually easier to write a custom plugin.
jmgallardo
Posts: 3
Joined: Tue Dec 06, 2011 2:51 pm

Re: Invert alarms

Post by jmgallardo »

With -h argument, we configure the IP address of the peer equipment.
With -w and -c, the thresholds for warning and critical always than the obteined values are higher than threshold.

But, how to do to obtain an alarm for a value lower than the thresholds?

10x!
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Invert alarms

Post by jsmurphy »

This is a good question and I like good questions because I might learn something... and learn something I did: http://nagiosplug.sourceforge.net/devel ... HOLDFORMAT

The above URLs show all the special characters available for changing the threshold bounds.
jmgallardo
Posts: 3
Joined: Tue Dec 06, 2011 2:51 pm

Re: Invert alarms

Post by jmgallardo »

Oh, thanks!
I will check it!
Regards.
Locked