templates or USERx in hostgroups.cfg not working?

Brian Smith bsmith at fusionbroadband.com
Fri Jul 29 02:04:07 CEST 2005


I'm banging my head on a wall with this so any help is greatly
appreciated...  Nagios version is 1.2 Stable Release.

Problem:  I cannot seem to get template definitions or $USERx$ vars
defined in resource.cfg to apply settings in hostgroups.cfg.  Are these
not supported for that config file or something?  

Our system has a central directory for main nagios config files, and
then separate directories for site-specific config files.  The
site-specific configs are automatically generated by triggered scripts
on the servers at the sites, so simply changing them all is a bad
option.  To effectively make changes to the contacts defined for
hostgroups on the sites requires either a template or a $USERx$ variable
in the central configs.  


I've tried the following for templates:

###  in central hostgroups.cfg

define hostgroup {
	hostgroup_name	gengroup
	contact_groups		people
	register			0
}


###  in site specific hostgroups.cfg

define hostgroup {
	use			gengroup
	hostgroup_name	sitename
	alias			descriptive stuff
	members		list_of_hosts, more_hosts, etc_hosts
}



and also tried the following for the $USERx$ variable:

###  in resource.cfg

$USER1$=/usr/nagios/libexec
$USER2$=people


###  in site specific hostgroups.cfg

define hostgroup {
	use			gengroup
	hostgroup_name	sitename
	alias			descriptive stuff
	contact_groups		$USER2$
	members		list_of_hosts, more_hosts, etc_hosts
}



Thanks, and hope that's enough information.
-- Brian


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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