How to specify in notification a RECURRING problem?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
AGray
Posts: 15
Joined: Wed May 29, 2013 1:34 pm

How to specify in notification a RECURRING problem?

Post 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!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to specify in notification a RECURRING problem?

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

Re: How to specify in notification a RECURRING problem?

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to specify in notification a RECURRING problem?

Post by abrist »

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.
Locked