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.

Is there any plugin or facility in nagios which can do this?? for ex: the CPU load rises to 80% for 2seconds would not be a problem. I want to get an alert if it remains at 80%++ for at least 5mins. is it possible??

share|improve this question
    
That's pretty much the whole point of Nagios. –  womble Aug 12 '12 at 4:45

2 Answers 2

While a service is okay, Nagios checks the service every check_interval minutes (well, technically interval_length, but that's usually one minute). When a service check fails, Nagios will start checking the service every retry_interval minutes and will only send an alert if the service remains in the failed state for max_check_attempts checks. See the documentation for details on all of this.

With that in mind, you can either make retry_interval large, or set max_check_attempts large, or both to increase the time a service must be in a failed state before reporting an error.

So if you want an alert only after a service has failed for more than five minutes, you can set retry_interval to 1 and max_check_attempts to 5. Note that the defaults are (I think) retry_interval = 1 and max_check_attempts = 3.

share|improve this answer
    
If I want to get alert in one/two second(s) I mean real time notification, What should I do??? –  Jerry Aug 29 '12 at 7:28

you can always script your own check. for instance you can have sar running on the cron and your custom nagios check control the last 30 minutes of samples from sar.

share|improve this answer

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.