大网数据广告活动
服务器运维问答

Nagios: exclude single contact from notifications

· 52CE 我爱测

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…

问题原文

原帖链接 · XNRL · CC BY-SA 3.0

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?

已采纳解答

原帖链接 · Jim Black · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-01-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。