Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Looking for a configuration option to make checks that respond with OK not reach a hard state until max_check_attempts has been reached.

Issue is we'll have a service that we can bring online then will go right back down in a couple of minutes, but when it comes back up it sends out the OK notification, which closes out the issue in our ticketing system.

share|improve this question
2  
Maybe you should redesign your check so that it does not report success unless the service is really fully running ? –  b0fh Aug 21 '12 at 22:32
    
Can't. Monitoring a projector (about 150 of them) where it will report that it's off, you can turn it on, then it will turn itself off a couple of minutes later. No warnings or anything, it's just self preservation of the projector. –  cpuguy83 Aug 21 '12 at 23:14

2 Answers 2

My recommendation would be to first determine how long after an outage of a projector is an acceptable time-frame before considering an outage a new outage versus still part of the last outage.

Depending on how like that window is, I would say to follow @b0fh suggestion and redesign the check. If the window is short (several minutes) simply tell the check on an OK result to sleep for X number of minutes and then rerun the check; if it passes the second time then send the exit code 0. However, if the window is longer then several minutes, I would say a better option is to redesign the check essentially with status caching (so that you can compare an outage/device up against the cache). In order for this method to be more effective, you may need to run the script/check as a scheduled job on the Nagios host and have it send passive check results to Nagios.

share|improve this answer

Nagios considers a host or service that is acting in the manner you describe to be flapping. You may wish to tweak your flap detection for this host/service.

share|improve this answer
    
Not quite. A flapping host/service is one that is constantly going back and forth. –  cpuguy83 Oct 5 '12 at 14:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.