Nagios: exclude single contact from notifications

monitoringnagios

There is a number of services that notify a contact_group on state changes. Is it possible to exclude a single contact that belongs to this group from getting notifications?

Prepending contact name with exclamation mark like this

 contacts                        !user
 contact_groups                  admins

doesn't work. Nagios version is 3.0

As there is a lot of services, contact groups, hosts, etc. I'd like not to introduce further complexity by creating another group without just this user. Also, due to the number of services this group is supposed to monitor it'd be difficult to track who receives what and seems unintuitive at best.

Are explicit exclusions of contacts from notification possible at all?

Best Answer

Nope. Nagios uses inclusive/inherited objects.

However your possible solution would depend on how this user is a member of the contact group.

If the 'admins' contact group is sending an email to a Group email account (one account with many users), then no change in Nagios is going to stop that user from getting emails. I prefer NOT to use these Group type email accounts in our monitoring systems for the very reason that they are nearly impossible to manage at our site. Requiring involvement with outside Exchange Admins, tickets, approvals, and so on.

If your 'admins' group does list the individual users, then you should remove this user from the 'admins' contact group, and add a 'contacts user' entry for those few items that you want the user to receive notifications on.

There also exists scripts on the web that give you a "who gets notified for a check" listing. They take into account all the inherited and grouped objects to give you a listing of every email account that would get notified and when - both for times and for what alert levels.

Related Topic