Object Definitions with Multiple Templates

Greg Pangrazio pangrazi at gmail.com
Wed Sep 23 17:27:44 CEST 2009


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