[Nagiosplug-devel] [RFC] Plugins config file

Gavin Carr gavin at openfusion.com.au
Thu Oct 19 01:35:25 CEST 2006


On Wed, Oct 18, 2006 at 11:56:54AM -0800, Vonnahme, Nathan wrote:
> > >> 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.
> > 
> > Well, # has special meaning to the shell. And you may be trying to
> > pass this argument across systems using ssh or other mechanism which
> > makes getting the quotes really tricky. Hence # $ are bad
> > choices. However maybe '/path/to/file at stanzaname' works since it is
> > using the entry in the file AT stanzaname.
> 
> 
> Wouldn't stanza@/path/to/file be more logical?
> 
> Perhaps a CGIish questionmark would work?
> 	--extra-opts=/path/to/file?stanzaname
> 
> Actually it would probably be clearer and more memorable to have two
> optional options, so you can omit one easily:
> 	--cfg-file=/path/to/file --cfg-stanza=stanzaname

One further wrinkle - a fairly typical use case, I imagine, will be 
that I want to use extra options from the default file and the default
section (i.e. plugin name?). It would be nice to be able to support
that too ...

  --extra-opts       ?
  --extra-opts=1     ?

I like Nathan's suggestion of separate args too though. Hmmm.

Cheers,
Gavin





More information about the Devel mailing list