Object Definitions with Multiple Templates

Tata, Joseph jtata at gpworldwide.com
Wed Sep 23 17:32:43 CEST 2009


It does, but I'm trying to avoid this because I have rather large number configurations in my environment that I need to cover (various clients, platforms, production levels, etc).  Chaining templates to cover every possible combination will be very complicated.
It would be much easier if I could actually use multiple templates where necessary. 


Joseph P. Tata



-----Original Message-----
From: Greg Pangrazio [mailto:pangrazi at gmail.com] 
Sent: Wednesday, September 23, 2009 11:28 AM
To: Tata, Joseph
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Object Definitions with Multiple Templates

When you define win-host can you put "use prod-host" in the definition?  Then in the host, only put "use win-host"?

Does this do what you are trying to accomplish?

Greg Pangrazio
pangrazi at gmail.com





On Wed, Sep 23, 2009 at 10:05 AM, Tata, Joseph <jtata at gpworldwide.com> wrote:
> 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
>

------------------------------------------------------------------------------
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