Page 1 of 1

Recheck when going from Warning to Critical?

Posted: Fri Mar 13, 2015 8:26 am
by BanditBBS
Capture.PNG
As you can see, at 00:01 it changed from Warning to Critical apparently due to an ssh connection issue, but then went right back to Warning. Is there any setting I can change to make any state change make it go soft again and it have to recheck so alerts aren't sent for false positives.

Re: Recheck when going from Warning to Critical?

Posted: Fri Mar 13, 2015 12:32 pm
by lmiltchev
Interesting question. This is a "default" behavior in nagios.
Hard States

Hard states occur for hosts and services in the following situations:

When a host or service check results in a non-UP or non-OK state and it has been (re)checked the number of times specified by the max_check_attempts option in the host or service definition. This is a hard error state.
When a host or service transitions from one hard error state to another error state (e.g. WARNING to CRITICAL).
When a service check results in a non-OK state and its corresponding host is either DOWN or UNREACHABLE.
When a host or service recovers from a hard error state. This is considered to be a hard recovery.
When a passive host check is received. Passive host checks are treated as HARD unless the passive_host_checks_are_soft option is enabled.
http://nagios.sourceforge.net/docs/nagi ... types.html

I haven't tried this, but it's probably possible to change the state to soft again via an event handler.

Re: Recheck when going from Warning to Critical?

Posted: Fri Mar 13, 2015 12:51 pm
by BanditBBS
Thanks Ludmil.

The eventhandler wouldn't accomplish my desired outcome(not sending a notification) so I guess we'll have to live with this functionality. You can close this up unless someone else chimes in with an awesome idea first :)

Re: Recheck when going from Warning to Critical?

Posted: Fri Mar 13, 2015 1:11 pm
by lmiltchev
I am closing it, but you can always PM me if you want it reopened.