Re: [Nagios-devel] Inheritance
Posted: Tue Feb 06, 2007 8:01 am
Andreas Ericsson wrote:
> John Relph wrote:
>> Christoph Maser writes:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>> See http://httpd.apache.org/docs/2.0/mod/core.html#options
>>
>> ... if all the options on the Options directive are preceded by a +
>> or - symbol, the options are merged. Any options preceded by a + are
>> added to the options currently in force, and any options preceded by
>> a - are removed from the options currently in force.
>>
>> Which basically says you can do this:
>>
>> hostgroups +linux-servers,web-servers
>>
>
> I read that to mean "+linux-servers,+web-servers" which would indeed make
> sense. Negating should probably be done with '!' to be consistent with
> the rest of the nagios configuration.
>
Yep, it basically means + (linux-servers,web-servers). The + sign
simply means to append the text that follows with whatever text is
inherited. The symbol could always be changed to prevent confusion, but
I think its probably the best symbol for representing what it does.
Group exclusion can be handled with adding the bang (!) symbol to a
hostgroup name, as in:
+ linux-servers,!web-servers
Note that the ! symbol is not currently supported in the hostgroups
directive, but it will be shortly.
It is implied that object names that don't have a preceding (!) are
intended to be added to the list, so there shouldn't be a need to have
to add a plus sign before each name.
Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> John Relph wrote:
>> Christoph Maser writes:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>> See http://httpd.apache.org/docs/2.0/mod/core.html#options
>>
>> ... if all the options on the Options directive are preceded by a +
>> or - symbol, the options are merged. Any options preceded by a + are
>> added to the options currently in force, and any options preceded by
>> a - are removed from the options currently in force.
>>
>> Which basically says you can do this:
>>
>> hostgroups +linux-servers,web-servers
>>
>
> I read that to mean "+linux-servers,+web-servers" which would indeed make
> sense. Negating should probably be done with '!' to be consistent with
> the rest of the nagios configuration.
>
Yep, it basically means + (linux-servers,web-servers). The + sign
simply means to append the text that follows with whatever text is
inherited. The symbol could always be changed to prevent confusion, but
I think its probably the best symbol for representing what it does.
Group exclusion can be handled with adding the bang (!) symbol to a
hostgroup name, as in:
+ linux-servers,!web-servers
Note that the ! symbol is not currently supported in the hostgroups
directive, but it will be shortly.
It is implied that object names that don't have a preceding (!) are
intended to be added to the list, so there shouldn't be a need to have
to add a plus sign before each name.
Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]