Page 1 of 1

How to stop Warnings after 10 notifications

Posted: Fri Sep 09, 2011 9:55 am
by petronagios
Hi, does anyone know how to disable warning notifications for host & services after a set number of notifications? I found the $SERVICENOTIFICATIONID$ macro which counts the notification number but I'm not sure how to script it.

Any help much apprieciated.

I'm using nagios 3.3.1 and nrpe 2.12

Thanks

Re: How to stop Warnings after 10 notifications

Posted: Fri Sep 09, 2011 3:41 pm
by nscott
Have you considered using escalations? You would have to set it like so

define hostescalation{
host_name myHost, thereHost # Or you could use reg exp like * here
first_notification 1
last_notification 10
notification_interval 30
contact_groups important_group
}

Add then just have the default contact be some dummy contact.

Re: How to stop Warnings after 10 notifications

Posted: Tue Sep 13, 2011 3:49 am
by petronagios
Many thanks for your reply Scott, it works!

I already have critical notifications configured to escalate to seperate groups, but following your instructions to create a dummy contact, and add the escalation for notifications (warnings only) starting at one, and finishing at ten works brilliantly.

Many thanks for your help.

Re: How to stop Warnings after 10 notifications

Posted: Tue Sep 13, 2011 1:32 pm
by mguthrie
Very cool, glad it's working for you!