This is a multi-part message in MIME format.
------=_NextPart_000_001D_01C47BCE.7D3D1110
Content-Type: text/plain;
format=flowed;
charset="iso-8859-1";
reply-type=original
Content-Transfer-Encoding: 7bit
I've been chasing a problem for the last little while with notifications
escalating too fast. The situation is this. We are pinging some routers
that we are not in charge of maintaining every 5 minutes. I have
notification interval set to 30 minutes. If I set a dummy contact that has
notification hours of none and setup a host escalation to start at
notification 5 and go to escalation 0, I would expect the first notification
to happen 2 hours after the router goes down and keep notifying me every 30
minutes until it comes up.
The issue is that I was getting notified at about 20 minutes instead of 2
hours. Digging into the code I found that even if a notification should go
out if no one is notified that it doesn't reset the next notification time.
The attached patch fixes this issue for both hosts and services.
-Shad
------=_NextPart_000_001D_01C47BCE.7D3D1110
Content-Type: application/octet-stream;
name="nagios-2.0-notification.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="nagios-2.0-notification.patch"
diff -ruN nagios-2.0a1.old/base/notifications.c =
nagios-2.0a1/base/notifications.c=0A=
--- nagios-2.0a1.old/base/notifications.c 2004-03-23 22:22:03.000000000 =
-0700=0A=
+++ nagios-2.0a1/base/notifications.c 2004-08-06 15:48:12.000000000 -0600=0A=
@@ -180,8 +180,8 @@=0A=
/* free memory allocated to the notification list */=0A=
free_notification_list();=0A=
=0A=
- /* adjust last/next notification time and notificiation flags if we =
notified someone */=0A=
- if(type=3D=3DNOTIFICATION_NORMAL && contacts_notified>0){=0A=
+ /* adjust last/next notification time and notificiation flags */=0A=
+ if(type=3D=3DNOTIFICATION_NORMAL){=0A=
=0A=
/* calculate the next acceptable re-notification time */=0A=
=
svc->next_notification=3Dget_next_service_notification_time(svc,current_t=
ime);=0A=
@@ -917,8 +917,8 @@=0A=
/* free memory allocated to the notification list */=0A=
free_notification_list();=0A=
=0A=
- /* adjust last/next notification time and notification flags if we =
notified someone */=0A=
- if(type=3D=3DNOTIFICATION_NORMAL && contacts_notified>0){=0A=
+ /* adjust last/next notification time and notification flags */=0A=
+ if(type=3D=3DNOTIFICATION_NORMAL){=0A=
=0A=
/* calculate the next acceptable re-notification time */=0A=
=
hst->next_host_notification=3Dget_next_host_notification_time(hst,current=
_time);=0A=
------=_NextPart_000_001D_01C47BCE.7D3D1110--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]