[Nagiosplug-devel] [RFC] Plugins config file

Gavin Carr gavin at openfusion.com.au
Wed Oct 18 13:21:25 CEST 2006


On Wed, Oct 18, 2006 at 09:43:52AM +0100, Ton Voon wrote:
> On 18 Oct 2006, at 02:08, Gavin Carr wrote:
> >I'm not strongly opposed to something like this if people feel it's
> >significantly simpler. There are two main differences between this  
> >and what I proposed:

<snip>

> I'm coming round to the idea of the config file - it has been well  
> argued here.
> 
> I don't like the idea of having the "extra level of indirection" with  
> another set of "standard" parameters (Where are they defined? Why are  
> the different?). So, I think the ini file should just hold the  
> current options, but in a more secure/readable format.

I'm fine with this suggestion. For some reason I'd forgotten about long 
option names, which should usually be fine for disambiguating options. 

> Plugins that support this new config file parsing of options take the  
> option (as Sean suggested) of
> 
>   --extra-opts=[configfile][:stanzaname]

Syntax quibble: how about 'configfile#section', like URL fragments?
Colon is already used in host:/path/to/file forms, and in ranges.

> The [:stanzaname]  
> defines a stanza within the config file, otherwise defaults to name  
> of plugin (maybe reserve "main" as a stanza name - this config file  
> has given me some ideas for future stuff).
> 
> An example stanza:
> 
> [check_mysql]
> username=tonvoon
> password=secret
> 
> So running "check_mysql -S --extra-opts=" should give the same result  
> as running "check_mysql -S --username=tonvoon --password=secret". If  
> fact, the variable names could just be the short option form:
> 
> [check_mysql]
> u=tonvoon
> p=password
> 
> But I'm guessing using that long names will be preferred. 

And just to clarify: you're saying that where an argument has multiple
forms (even more than two), any of them would also be acceptable in 
the config file?

Cheers,
Gavin





More information about the Devel mailing list