Object Definitions with Multiple Templates

Tata, Joseph jtata at gpworldwide.com
Wed Sep 23 17:05:11 CEST 2009


I am having a problem getting Nagios to accept multiple templates in
object definitions.  

Here is an example.  I have two templates defined in templates.cfg: 


define host {
use                             host #This is my "generic" template with
all my basic options in it
name                            prod-host
hostgroups                      prod_servers #Production server host
group
notification_period             24x7
register                        0
}
 

define host {
use                             host
name                            win-host
hostgroups                      win_servers #Windows server host group
register                        0
}

Defining an object with either of these templates works fine.  However
what I really need to do is: 

define host {
use                             prod-host,win-host 
name                            windows-server
address				  192.1.1.1
alias					  My Windows Production Server
}

Instead when I run nagios -v I get:

"Error: Template 'prod-host,win-host' specified in host definition could
not be not found" etc.

http://nagios.sourceforge.net/docs/3_0/objectinheritance.html indicates
this should be possible, and that the resulting object should have
properties of both hosts, but something isn't working.  Am I not
defining something correctly or is this possibly a bug/documentation
error?

Thanks


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
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