Hello XI support
Which settings would take precedence when configuring templates as follows:
Host template (contains contact group, monitoring and notification frequencies) / group of hosts has one configured instead of default template 1:1 (every host has applicable template set by-host)
Service template (same monitoring and notification frequencies, sometimes different from those specified in host) 1:1 to various service checks
Now we have hosts added to service checks (where host subjected to one template and service check to another template
- How to make this right?
HOST VS TEMPLATE settings when configuring checks
Re: HOST VS TEMPLATE settings when configuring checks
Using multiple layers of templates could get tricky. In general, the host templates are applied to hosts, the service templates - to services. If you had the same directive added to multiple templates (that are added to a host/service), nagios would use the value defined in the first template. You may have "Cancelling, Additive or Implied Inheritance"... Also, local variables would always override the ones in templates. So, without looking at a specific example, it is hard to say what template would take precedence.
For more information, please review our documentation on Object Inheritance here:
https://assets.nagios.com/downloads/nag ... tance.html
Tip: When in doubt, you can always review the host/service configs in the objects.cache to see what directives are being used.
Hope this helps.
For more information, please review our documentation on Object Inheritance here:
https://assets.nagios.com/downloads/nag ... tance.html
Tip: When in doubt, you can always review the host/service configs in the objects.cache to see what directives are being used.
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: HOST VS TEMPLATE settings when configuring checks
How to get to object.cache ?lmiltchev wrote:Using multiple layers of templates could get tricky. In general, the host templates are applied to hosts, the service templates - to services. If you had the same directive added to multiple templates (that are added to a host/service), nagios would use the value defined in the first template. You may have "Cancelling, Additive or Implied Inheritance"... Also, local variables would always override the ones in templates. So, without looking at a specific example, it is hard to say what template would take precedence.
For more information, please review our documentation on Object Inheritance here:
https://assets.nagios.com/downloads/nag ... tance.html
Tip: When in doubt, you can always review the host/service configs in the objects.cache to see what directives are being used.
Hope this helps.
I check HOSTS via ICMP or HTTP (more frequent, to avoid over-notification in the event of failure) - something you suggested few month ago when I asked
Now, services are countless and done against many hosts, so attempted using templates by service type to be able to change configurations quickly and segregate DEV / PROD service check frequencies and notifications
How can I do that?
Re: HOST VS TEMPLATE settings when configuring checks
dlukinski wrote:How to get to object.cache ?
Code: Select all
vi /usr/local/nagios/var/objects.cacheI don't fully understand this question. Are you asking how to change something quickly? I'd have multiple templates for multiple purposes and change the template as need be.dlukinski wrote:I check HOSTS via ICMP or HTTP (more frequent, to avoid over-notification in the event of failure) - something you suggested few month ago when I asked
Now, services are countless and done against many hosts, so attempted using templates by service type to be able to change configurations quickly and segregate DEV / PROD service check frequencies and notifications
Former Nagios Employee.
me.
me.
Re: HOST VS TEMPLATE settings when configuring checks
--------------------------------------------hsmith wrote:dlukinski wrote:How to get to object.cache ?Code: Select all
vi /usr/local/nagios/var/objects.cacheI don't fully understand this question. Are you asking how to change something quickly? I'd have multiple templates for multiple purposes and change the template as need be.dlukinski wrote:I check HOSTS via ICMP or HTTP (more frequent, to avoid over-notification in the event of failure) - something you suggested few month ago when I asked
Now, services are countless and done against many hosts, so attempted using templates by service type to be able to change configurations quickly and segregate DEV / PROD service check frequencies and notifications
NO I asked which template host or service would take precedence imposing monitoring and notification frequency (both of them having different numbers)
- IF we cannot answer this question, should we "hardcode" host monitoring and notification frequency and keep services under templates?
Re: HOST VS TEMPLATE settings when configuring checks
If it's a service, the service template would take priority. If it's a host, the host template would take priority.
The service would only inherit the hosts settings (certain ones) if it didn't have those defined. See the implied inheritance section here:
https://assets.nagios.com/downloads/nag ... tance.html
The service would only inherit the hosts settings (certain ones) if it didn't have those defined. See the implied inheritance section here:
https://assets.nagios.com/downloads/nag ... tance.html
Re: HOST VS TEMPLATE settings when configuring checks
Thank you, This answers my question.ssax wrote:If it's a service, the service template would take priority. If it's a host, the host template would take priority.
The service would only inherit the hosts settings (certain ones) if it didn't have those defined. See the implied inheritance section here:
https://assets.nagios.com/downloads/nag ... tance.html
Re: HOST VS TEMPLATE settings when configuring checks
Is it alright if we lock this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: HOST VS TEMPLATE settings when configuring checks
Yes please and thank youmcapra wrote:Is it alright if we lock this thread and mark the issue as resolved?