How to stop Warnings after 10 notifications

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
petronagios
Posts: 28
Joined: Tue Aug 16, 2011 8:02 am

How to stop Warnings after 10 notifications

Post 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
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: How to stop Warnings after 10 notifications

Post 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.
Nicholas Scott
Former Nagios employee
petronagios
Posts: 28
Joined: Tue Aug 16, 2011 8:02 am

Re: How to stop Warnings after 10 notifications

Post 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.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: How to stop Warnings after 10 notifications

Post by mguthrie »

Very cool, glad it's working for you!
Locked