Page 1 of 1

Templates / inheritance: any way to show effective settings?

Posted: Fri Sep 14, 2012 12:08 pm
Hello all,

I'm trying to get a handle on templates and how settings are inherited. Is there any way to show the effective settings on a particular host or service check?

Thanks!

Re: Templates / inheritance: any way to show effective setti

Posted: Fri Sep 14, 2012 2:35 pm
by mguthrie
The core docs are actually still the best documentation on how object inheritance works. Templating can range from simple to very complex depending on how you're wanting to set it up.
http://nagios.sourceforge.net/docs/3_0/ ... tance.html


[Edit]: The effective settings can't really be seen until Nagios restarts and actually compiles all of the configurations. XI doesn't have a built-in config viewer, but the Core interface at http://yourserver/nagios actually has a configuration page that you can view all of the compiled configurations after templates have been applied.

Re: Templates / inheritance: any way to show effective setti

Posted: Mon Sep 24, 2012 6:02 pm
Excellent... That configuration page in the Core interface is a huge help.

My goal is to set up a simple host template scheme. 2 templates: critical-host and non-critical-host. The question is whether service checks will inherit check and alert settings from the host.

For example: Checking free space on the system drive... I set up 1 test, and listed all of the hosts that should be tested.
For critical hosts, the service checks should run more frequently and notify 24x7.
For non-critical hosts, the service checks can run less frequently, and notify only during business hours.

Thanks for your help!

Re: Templates / inheritance: any way to show effective setti

Posted: Mon Sep 24, 2012 6:34 pm
Update: I found the answer in the documentation you pointed me to.
Services will inherit contact_groups, notification_interval, and notification_period from the host definition.
That still gets me most of what I was hoping for.

Thanks again!