Page 1 of 1

Invert alarms

Posted: Tue Dec 06, 2011 3:10 pm
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.

Re: Invert alarms

Posted: Sun Dec 18, 2011 5:34 pm
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.

Re: Invert alarms

Posted: Mon Dec 19, 2011 8:09 am
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!

Re: Invert alarms

Posted: Mon Dec 19, 2011 4:55 pm
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.

Re: Invert alarms

Posted: Tue Dec 20, 2011 4:05 am
by jmgallardo
Oh, thanks!
I will check it!
Regards.