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

Gavin Carr gavin at openfusion.com.au
Sun Feb 18 05:11:40 CET 2007


On Fri, Feb 16, 2007 at 09:14:06AM +0000, Ton Voon wrote:
> Hi!
> 
> Matthias wrote:
> >
> > Btw: the filename /etc/plugins.ini is too general in my opinion.
> > I'd prefer nagios-plugins.ini or nagiosplug.ini
> 
> Fair point. I like nagios-plugins.ini as this matches the tarball  
> distribution.

It's too general in a general-purpose directory like /etc. It's just
right in a nagios directory like /etc/nagios. IMO it's okay to support
both.

> On 16 Feb 2007, at 07:07, sean finney wrote:
> 
> > On Fri, 2007-02-16 at 00:24 +0100, Matthias Eble wrote:
> >>> What about using an environment variable if set. Otherwise look in a
> >>> set of "common" locations. Given that we use the same prefix as
> >>> nagios (/usr/local/nagios), maybe /usr/local/nagios/etc/plugins.ini
> >>> is a decent default. I guess other common locations are:
> >>>   /etc/plugins.ini
> >>>   /etc/nagios/plugins.ini
> >>>   /usr/local/etc/nagios/plugins.ini
> >>>   /usr/local/etc/plugins.ini
> >>
> >> perhaps the FHS way should be considered, too:
> >> /etc/opt/(nagiosplug|nagios-plugins)/plugins.ini
> >
> > i would say that both the plugins and Nagios::Plugin should have
> > a single default location, which equates to the same config root
> > where the rest of the files would go in a default "make install",
> > with a sensible filename.
> >
> > as long as both of the above provide a way to override this setting
> > (i.e. by setting passing some cmdline option when building/installing
> > or having the location in an easily patchable location), i don't see
> > there being any problem.  plus, one will always be able to override
> > it at runtime too.
> 
> OK. So if $DEFAULT_INI_FILE=/usr/local/nagios/etc/nagios-plugins.ini  
> is somewhere in Nagios::Plugin.pm, then when the Debian maintainer  
> packages it, they can patch just this one line? Sounds fair.

But that doesn't solve the install from CPAN problem though, right? I
think we're probably going to have add install-time code there too to
search for likely directories and get explicit confirmation from the
user, if possible ...

Cheers,
Gavin





More information about the Devel mailing list