service contacts mapped by hostgroup

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
traylenator
Posts: 1
Joined: Wed Dec 19, 2018 12:26 pm

service contacts mapped by hostgroup

Post by traylenator »

Hi

About every 3 years I decide to reorganise how I am doing hostgroup, servicegroups, ... etc. I always seem to run in to
this case which I am never happy with my solution. Simplified case:

2 hostgroups of machines all running SSH servers . The different groups of machines have different managers.

1. So I create two nagios_hostgroups (hg_A , hg_B) with a contact in each ., that is just fine for host level problems.

2. I create one nagios_service for ssh which is applied to both hostgroups.

Where do I configure the 2 sets of admins so that service events for nagios hg_A and hg_B go to different people.

I always end up creating an SSH_A and SSH_B service but this seems the wrong thing to do.

Any suggestions very welcome.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: service contacts mapped by hostgroup

Post by ssax »

You can't assign contacts to a hostgroup in Nagios, please explain further what you mean by this so that I'm understanding you correctly.

You can use inheritance and define the contacts/contact_groups on the host only and NOT define any contacts/contact_groups on the services, that way the service will inherit the contacts from the hosts themselves, you can read more about inheritance here:

Code: Select all

https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/objectinheritance.html
That way you'd only have one service and the contacts/contact_groups would be inherited from the hosts (meaning they will be different).
Locked