Multiple Inheritance Sources and variable concatenations

L B bertignac at gmail.com
Wed Aug 22 15:36:22 CEST 2007


Hi all,

I've read the end of this page
https://nagios.sgs.net/nagios/docs/objectinheritance.html about multiple
inheritance sources.

I'm going to explain what I want with an example :

I have a template for windows-servers with an hostgroups variable defined.
I have another template for ABC-servers with also an hostgroups variable
defined ( ABC is a project name).

I want my server to belong to both.

I defined a new host like this :

define host {
name windows-server
hostgroups windows-server
...
register 0
}
define host {
name ABC-server
hostgroups ABC-server
...
register 0
}

define host {
use  windows-server,ABC-server
...
}

The problem, and according to the documentation, is that only the hostgroups
variable of the first template is kept.

Is it possible to add a concatenation feature to this inheritance, for
example by adding a + in front of the hostgroups name ?

If I define a template like this :
define host {
name ABC-server
hostgroups +ABC-server
...
register 0
}

I would like the hostgroups variable to be concatenated to the previous ones
inherited from other templates.

I thought it was the expected behavior but it doesn't work.

Thanks,
-- 
L.B.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20070822/0cdbc87d/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list