Re: [Nagios-devel] Additive inheritance and canceling inheritance
Posted: Fri Oct 19, 2007 6:11 am
----- Original Message -----
From: "Ethan Galstad"
To: ; "Nagios Developers List"
Sent: Thursday, October 18, 2007 6:03 PM
Subject: Re: [Nagios-devel] Additive inheritance and canceling inheritance
issues
> 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.
> me know how it works.
Works exactly as expected. Thank you very much.
-Shad
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]