Page 1 of 1
default contact on hosts
Posted: Thu Mar 25, 2021 2:35 pm
by pspagnola
when I look at the "alert settings" tab of a newly created host, I see one contact (me) and zero contact groups attached to the host.
How are these default values determined? I am using templates to control the notification settings, but I would like to better understand notification behavior defaults when no templates are used.
I have read KBs and searched the forums without any results related to default contact or contact groups applied to hosts.
Re: default contact on hosts
Posted: Fri Mar 26, 2021 12:53 pm
by benjaminsmith
Hi,
How are these default values determined? I am using templates to control the notification settings, but I would like to better understand notification behavior defaults when no templates are used.
When a template is not assigned it's going to use the local settings and you'll get a configuration error if a required directive is missing.
There's one caveat here, the concept of implied inheritance. In some cases, if a required directive for a service is missing it will try to use the value assigned to its host. For details on these rules, please visit the following page.
Nagios Core Object Inheritance
To see the complete object with all the inherited settings, look the object up in the following file.
Code: Select all
/usr/local/nagios/var/objects.cache
References
Using The Core Config Manager For Host Management
Using The Core Config Manager For Service Management
Re: default contact on hosts
Posted: Fri Mar 26, 2021 3:36 pm
by pspagnola
I guess one question I did not ask is: The default contact assigned to everyhost appears to be directly configured even though I did not do that. I believe direct object values override inherited template values. That is my main concern for the question.
Will the objects.cache file show me where a value came from or just show the final effective value set?
Re: default contact on hosts
Posted: Mon Mar 29, 2021 11:02 am
by benjaminsmith
Hi,
The default contact assigned to everyhost appears to be directly configured even though I did not do that. I believe direct object values override inherited template values. That is my main concern for the question.
If you set up monitoring using the wizards, it selects the admin group by default unless the Nagios Administrators (admins) is unselected, I believe that is what happened. If you want to change all those objects, I would recommend using the Bulk Mods Tool in the Core Config Manager.
That is correct, any local settings will override what is in the templates.
Objects.cache will only show the final value set. In the CCM, under the actions menu, click Relationships, and modal will pop up showing all the templates the object is inheriting.
relationships-templates.png
You can also grab this data from the Config endpoint in the API.
Let us know if you have any other questions.
--Benjamin
Re: default contact on hosts
Posted: Wed Mar 31, 2021 1:30 pm
by pspagnola
I cannot find the relationship screen that you show. Can you tell me how to find it with more steps?
Re: default contact on hosts
Posted: Thu Apr 01, 2021 10:19 am
by benjaminsmith
HI,
No problem, navigate to the CCM by going to Configure from the top-level navigation bar and then select CCM Advanced Configuration. Then click hosts (or services) under Monitoring from the left-hand sidebar menu.
This will produce a searchable listing of all the hosts in the database, under the actions column, click Relationships.
relationships-ccm.png
Let me know if that helps or if you have more questions.
Re: default contact on hosts
Posted: Thu Apr 01, 2021 5:28 pm
by pspagnola
thank you. It would be nice if the button was accessible from another area as well. like a relationship button when you click on the host.
Re: default contact on hosts
Posted: Fri Apr 02, 2021 10:45 am
by benjaminsmith
Hi,
thank you. It would be nice if the button was accessible from another area as well. like a relationship button when you click on the host.
Your welcome and thanks for the feedback!