Is it normal for a service to inherit it's host template contacts?
When i check http://nagios.sourceforge.net/docs/3_0/ ... tance.html, it is said in the implied inheritance section that only contactgroups of the host are inherited by a service. But I have a service that is sending email to a contact that is only configured in it's host template, which I didn't expect..
So I have a host with a host template and a service (with no template atm), there are no contacts/contact groups defined in the service and no contacts/contact groups on the host. The host template has 2 contacts defined and the service seems to send email when it's critical to the these two contacts.
Unexpected inheritance of host template contacts
Re: Unexpected inheritance of host template contacts
Services will in fact inherit the contacts from the host object. The difference that they are *not* implicitly inherited, as contacts on a host will *always* be contacts for that host's services.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Unexpected inheritance of host template contacts
Thanks again for your fast answer. I had some difficulties with the word implicit, but I think I get it now.
So contact groups need to be defined in the service or the service template or it will inherit the host or host template contact group.
You say host contacts will always be contact for that host services.
Does this mean always when it has standard and no service contact defined?
Because the way I see it now the host contacts are not inherited when the service has a contact defined. If I would set the contact options to +, would it mean the service contact and host contact are merged?
I just tested this and it seems the + in service contact option does not make the contacts from the host and the service template merge. So it seems if the service or service template has a contact defined the host contact is not inherited?
So contact groups need to be defined in the service or the service template or it will inherit the host or host template contact group.
You say host contacts will always be contact for that host services.
Does this mean always when it has standard and no service contact defined?
Because the way I see it now the host contacts are not inherited when the service has a contact defined. If I would set the contact options to +, would it mean the service contact and host contact are merged?
I just tested this and it seems the + in service contact option does not make the contacts from the host and the service template merge. So it seems if the service or service template has a contact defined the host contact is not inherited?
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Unexpected inheritance of host template contacts
Can you show us the template, host, and service in question that you have been testing with? You can access their raw configuration output through CCM > {Host/Service Templates], [Hosts], [Services] > Click the blue diskette icon next to them.
Edit: Blocking out sensitive information of course!
Edit: Blocking out sensitive information of course!
Re: Unexpected inheritance of host template contacts
Hmmm, it's kind of full with 'sensible' information... I've been testing this and it seems when a service contact has '+' configured, the service template contacts are added to the contact list, but the host contacts are not.
With this config the service only contacted A and B
The above seems strange as I would expect the + to not only merge the ST_1's contacts, but also HT_1's contacts which was not so in my test.
With this config the service only contacted C, which seems normal.
I did not test anything with contact groups, but I still not completely understand the difference for inheritance to be honest.
Code: Select all
Service S_1 with service template ST_1 with Contact Options + => Contact A
Service template ST_1 => contact B
Host H_1 with host template _HT_1 => No contacts
Host template HT_1 => Contact CThe above seems strange as I would expect the + to not only merge the ST_1's contacts, but also HT_1's contacts which was not so in my test.
Code: Select all
Service S_1 with service template ST_1 with Contact Options Standard => No contact
Service template ST_1 => contact B
Host H_1 with host template _HT_1 => No contacts
Host template HT_1 => Contact CI did not test anything with contact groups, but I still not completely understand the difference for inheritance to be honest.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Unexpected inheritance of host template contacts
Looks like I need to amend my previous statement with an exception:
Contacts on a host will *always* be contacts for that host's services except when a contact is defined on the service object itself.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Unexpected inheritance of host template contacts
Ok, that's making a lot more sense to me.. As I'm planning to configure a contact for each service this shouldn't be an issue. You can close the thread.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net