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?

  • Nagios 3.0? Are you sure about that? You should at least upgrade to the latest 3.x branch. The list of bug fixes between 3.0 and 3.5.1 is hundreds of items long, spanning over 5 years. – Keith Jan 13 '16 at 21:16
  • True, but the installation has been around for ages, and while we consider moving to Nagios4, it'll take some time (months probably), so for now gotta plug the holes. – XNRL Jan 14 '16 at 11:49

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.