On Wed, Dec 16, 2009 at 11:05 AM, Gordon Messmer <yiny...@eburg.com> wrote:
> On 12/15/2009 11:03 PM, Martin Melin wrote:
>> I don't understand why this is confusing.
>>
> ...
>> By setting "notification_period null" in your service definition, you
>> are explicitly overriding all forms of inheritance and setting the
>> notification_period to null, which happens to be a special
>> notification_period.
>>
>
> Is that so?  What does the special value do?  In all of the
> documentation, I only see "null" mentioned once.  In a section labeled
> "Cancelling Inheritance of String Values".  The documentation indicates
> that "null" can be used to prevent inheriting a value.  Neither of those
> things say to me, the user, that "null" is a special notification period.
>
>> So, the issue you are running into is due to you expecting implied
>> inheritance to take precedence over values defined in the service
>> definition itself.
>
> Only where the value is "null", which is documented only to prevent the
> inheritance of a value.
>
>> This would break the documented and expected
>> behavior of inheritance, and a lot of people's configurations.
>>
>
> I'm sure that when you tell me what the "null" notification period does,
> I'll understand how.  For now, I don't, because it doesn't seem to be
> documented.

null is a value for a notification period that does not have any
effect. Most config's I've seen have a timeperiod named "none",
configured to never match. This accomplishes the same thing. Using
null does not do anything special as far as inheritance is concerned -
you could define a timeperiod call "foobar" that never matches, and
use that instead of null. The problem is that both you and I got the
impression that 'null' might instead reset a variable so that it
behaves the same as being undefined, i.e. would not propagate to an
implementing definition from a template.

>
>> Something that might work, but unfortunately I can't try it as I've
>> already spent too much time on this email :-), is to set
>> notification_period to null in the template, which could mean that the
>> service definition will behave as though the notification_period value
>> is unset in the template. This would allow you to let the "null
>> notification period" template inherit from your normal template.
>>
>
> I'm not sure if you read my original email, but that's EXACTLY what I
> did.  Tell me again how you don't understand why this is confusing.

Interesting. I thought that you were setting the notification_period
in the service definition, but I see now that it is in the service
template. My mistake.

>
> Snark aside, I appreciate the help and discussion.  However, looking at
> the documentation again only convinces me more that the documentation
> and the code don't match up.  Your confusion, too, lends credence to my
> position, IMO.

I agree that the documentation can be clarified to explain that the
value 'null' does not, as one might think, reset a variable to
undefined.

Best regards,
Martin Melin

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Nagios-users mailing list
Nagios-users@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

Reply via email to