特定主机的 Nagios 服务通知给特定用户 [英] Nagios service notifications for specific hosts to specific users

查看:38
本文介绍了特定主机的 Nagios 服务通知给特定用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Nagios,我希望能够在特定主机上的服务失败时发送用户通知.然而,另一台主机上的相同服务应该提醒其他人.

Using Nagios, I want to be able to send a user notifications when the services on a specific host fail. Yet those same services on another host should alert somebody else.

例如:

HostA"已启动,但HostA"上的www"服务已关闭 --> 通知用户 A
HostB"已启动,HostB"上的www"服务已启动 --> 未通知 UserB

"HostA" is up, but "www" service on "HostA" is down --> Notify UserA
"HostB" is up, and "www" service on "HostB" is up --> UserB is not notified

换句话说...如果 HostA 上的 WWW 服务关闭,则只应通知 UserA,
但如果 HostB 上的 WWW 服务宕机,则由 UserB 负责.

In other words... if the WWW service on HostA is down, only UserA should be notified,
but if the WWW service on HostB is down, then UserB is responsible for it.

我可以轻松地将用户 A 分配给主机 A 和/或 www 服务,但我希望用户 A 负责主机 A,在主机 A 上运行的所有服务.

I can easily assign User A to Host A and/or to the www service, but I want user A to be responsible for Host A, and for all the services running on Host A.

想法?

推荐答案

将 UserA 分配给 HostA 作为联系人.不要为 HostA 的服务定义/分配任何联系人.然后服务将继承主机的联系信息.请参阅文档中表格的第一行:

Assign UserA to HostA as the contact. Don't define/assign any contacts to the services for HostA. Then the services will inherit the contact info for the Host. See the first line in the table in the docs:

或者,您可以将联系人放入联系人组.

Optionally, you can put the contact into a contactgroup.

这篇关于特定主机的 Nagios 服务通知给特定用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆