[Nagiosplug-devel] RFC: Plugins config file (final proposal)

Andreas Ericsson ae at op5.se
Tue Jan 30 10:44:07 CET 2007


sean finney wrote:
>> If you use ini-style, you end up with the problem of "how do we do with
>> subsections?" such as when one plugin wants one environment (check_oracle)
>> and another plugin needs something else.
> 
> i believe that had already been at least partially addressed by the
> specification.  namely, you could override the ini section name for a
> particular plugin, or which file was parsed at all.
> 

Ah, that makes sense.

> 
>>> furthermore, you example brought up an issue which will need to be
>>> clarified... what's the specification for parsing quotes?
>> Why use quotes? We're talking C/Perl here, aren't we?
>>
> 
> i didn't say we needed to, i was just pointing out that it hadn't been specified,
> and i felt that it would be a liability in the future not to do so--as the example
> i was responding to there were quotes in one of the settings.
> 

True. I'd say like this:
Leading and trailing spaces are stripped from variables and values alike.
Variable names may not start with [.
Variable names may not contain =.
= separates variable name and value.
Spaces surrounding the first '=' on the line is ignored.
A single backslash escapes the character following it [1].
Newlines aren't allowed in configuration variables.

[*1*] This is needed to let variable values start with a space.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231




More information about the Devel mailing list