Page 1 of 1

How to specify in notification a RECURRING problem?

Posted: Mon Jun 17, 2013 10:39 am
by AGray
I have some issue which those responsible are not resolving. For example, disk space on a specific filesystem goes in to Warning or Critical state, an email (via notify-service-by-email) goes out, then the notification_interval is 1440 (1 day), and yet again the next day the same email goes out. The users who see that don't know if it is the same issue from the day before or perhaps the issue did get resolved, and this is new (we have recovery emails disabled at their (and my mgr) request).

so I was thinking, is there some way for Nagios to know that the notification you are sending again (~1440 minutes later) is from the issue that occurred the day before, and the state never went to OK, but remained in either Critical or Warning? If so, I want to tweak the email to say something to the effect of "Notification Type: RECURRING PROBLEM" rather than just "PROBLEM"

Thanks!

Re: How to specify in notification a RECURRING problem?

Posted: Mon Jun 17, 2013 2:13 pm
by abrist
You could include the $SERVICEDURATION$ macro in your notification which would allow the notified user to see how long the service has been in the DOWN state.

Additionally, you could create an event handler script that checks the $SERVICEDURATION$ and then emails a RECURRING warning to the contacts. This will take a little work to pull off though.
From: http://nagios.sourceforge.net/docs/3_0/ ... ceduration

Code: Select all

$SERVICEDURATION$ 	A string indicating the amount of time that the service has spent in its current state. Format is "XXh YYm ZZs", indicating hours, minutes and seconds.

Re: How to specify in notification a RECURRING problem?

Posted: Mon Jun 17, 2013 2:57 pm
by AGray
I think the $SERVICEDURATION$ as you stated is going to be the answer. I think I need to write a wrapper and utilize this.
I'll report back later when I muck with it.

Thanks

Re: How to specify in notification a RECURRING problem?

Posted: Mon Jun 17, 2013 3:43 pm
by abrist
No problem, if you need some assistance with notifications and macros, let us know. Cheers.