Only send notifications after a service has been down for X

Hi there.

I’m relatively new to nagios, but i have it up and running rather nicely for a set of about 10 machines and 100 services across 3 colos.

I’d like to know if there is a way to configure nagios to send notifications only after a service has gone down (hard or soft) for more than X minutes.

The reason why i want this is that i have one service that goes down for a minute or so every couple of hours. The times that the service goes down is random and the duration is usually short (<2 min). Every time the service goes down and comes back up, i get notified (which is what you’d normally expect to happen). However, since this service flakes out like this, i’m getting too many notifications (10-15 per day).

I’d like to configure nagios to say “only notify me when this service is down for more than 5 minutes”. That way i can cut down on the noise, yet still be notified that this is a problem i need to look at.

Yeah, i know i should try to fix the service, but that’s way more effort than trying to reconfig nagios to not bug me with noise. :slight_smile:

Is there a way to do this?

I think i figured it out, and it seems pretty simple. I’m going to try setting max_check_attempts to something higher for this service.

Did you ever figure this out?

If so, how did you manage it?

yep, if you modify your max_check_attempts to 3 and your retry_interval to 2 in your service definition, it will not change state to CRITICAL until 6 minutes is up.