How to specify in notification a RECURRING problem?

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

How to specify in notification a RECURRING problem?

Postby AGray » Mon Jun 17, 2013 10:39 am

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!
AGray
 
Posts: 15
Joined: Wed May 29, 2013 1:34 pm

Re: How to specify in notification a RECURRING problem?

Postby abrist » Mon Jun 17, 2013 2:13 pm

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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to specify in notification a RECURRING problem?

Postby AGray » Mon Jun 17, 2013 2:57 pm

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
AGray
 
Posts: 15
Joined: Wed May 29, 2013 1:34 pm

Re: How to specify in notification a RECURRING problem?

Postby abrist » Mon Jun 17, 2013 3:43 pm

No problem, if you need some assistance with notifications and macros, let us know. Cheers.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm


Return to Community Support

Who is online

Users browsing this forum: No registered users and 36 guests