Additive inheritance and canceling inheritance issues
Ethan Galstad
nagios at nagios.org
Fri Oct 19 02:03:33 CEST 2007
Ethan Galstad wrote:
> Shad L. Lords wrote:
>> Following up on my previous message about additive inhereritance it appears
>> that it only applies to the first used instance. Here is an example config
>> that fails. There also appears to be an issue with canceling inheritance.
>>
>> define host {
>> name default
>> check_command check_host_alive
>> max_check_attempts 3
>> check_period 24x7
>> flap_detection_enabled 1
>> process_perf_data 0
>> retain_status_information 1
>> retain_nonstatus_information 1
>> notification_interval 30
>> notification_options d,r,f
>> notifications_enabled 1
>> register 0
>> }
>>
>> define host {
>> name A6
>> hostgroups +rhg_A6
>> parents SW-CAB_A6
>> register 0
>> }
>>
>> define host {
>> name 24x7
>> notification_period 24x7
>> register 0
>> }
>>
>> define host {
>> name sec
>> hostgroups +nhg_sec
>> contact_groups +cg_sec1
>> register 0
>> }
>>
>> define host {
>> use default,A6,24x7,sec
>> host_name dwsoms1
>> alias OMS 1
>> address theip
>> parents null
>> }
>>
>> What I'd like to have the end resulting object be is:
>>
>> hostgroups rhg_A6, nhg_sec
>> contact_groups cg_sec1
>> notification_period 24x7
>> no parents defined
>>
>> I end up with an object that has:
>>
>> hostgroups rhg_A6
>> contact_groups cg_sec1
>> notification_period 24x7
>> parents SW-CAB_A6
>>
>> If I add a "hostgroups +nhg_sec" line to the last host then it doesn't add
>> nhg_sec to the hostgroups instead it replaces it and I end up with only
>> nhg_sec. However if I change the "use default,A6,24x7,sec" to "use
>> A6,default,24x7,sec" then I do get both hostgroups listed.
>>
>> Hope this helps track down some potential issues,
>>
>> -Shad
>>
>
[snip]
>
> The example config entries you provided offer another way to use
> additive inheritance which would definitely be useful. I'll work on
> getting a patch into CVS in the next day or two to make that work.
>
> Thanks for the feedback and suggestions.
>
Following up to myself... A patch is now in CVS which should support
the configuration syntax you're looking for. :-) Give it a try and let
me know how it works.
Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org
-------------------------------------------------------------------------
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/
More information about the Developers
mailing list