Search code examples
notificationsnagios

Nagios service notifications for specific hosts to specific users


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.

For instance:

"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

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.


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.

Ideas?


Solution

  • 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.