Parameter defined in template and also in host. Which one is it going to be?

Morris, Patrick patrick.morris at hp.com
Fri Nov 6 21:33:03 CET 2009


Hi Jelle!

On Fri, 06 Nov 2009, Jelle Smet wrote:

> Hi 
> 
> If I have following example what determines which check_period "bogus-router" will have?
> - Is it determined by the order Nagios reads the configs?
>   If this is the case, it can be manipulated by ordering different config files?
> - Or does a parameter in a host, override the same parameter in a template?
> 
> Cheers,
> 
> 
> define host{
>         host_name                       canaries
>         check_period                    16x5
>         }
> 
> define host{
> 	use			        canaries
> 	host_name			bogus-router
> 	alias				Bogus Router #1
> 	address				192.168.1.254
> 	parents				server-backbone
> 	check_command			check-host-alive
> 	check_interval			5
> 	retry_interval			1
> 	max_check_attempts		5
> 	check_period			24x7
> 	process_perf_data		0
> 	retain_nonstatus_information	0
> 	contact_groups			router-admins
> 	notification_interval		30
> 	notification_period		24x7
> 	notification_options		d,u,r
> 	}

bogus-router will have a check_period of 24x7, because you've overridden
the value in the host definition.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list