[Nagiosplug-devel] Integrating Nagios::Plugininto the distribution

Gavin Carr gavin at openfusion.com.au
Mon May 14 06:01:13 CEST 2007


On Fri, May 11, 2007 at 09:46:12AM +0100, Ton Voon wrote:
> Looking back across this thread, I think almost everyone agrees we  
> have to support installing N::P in a nagios dir for simple  
> installation (as Matthias points out), and for sites which do not  
> allow changes to system perl dirs (as John points out).
> 
> The only dissenting opinion is from Gavin, because of duplication of  
> N::P (local v system dirs) and making a deployment decision within  
> code (by using FindBin).
> 
> I'm not sure how to overcome the duplication, though a well managed  
> system will have one or the other. If we clearly say a plugin prefers  
> a local dir if it is there, that should make it clear which module is  
> being used.
> 
> The FindBin objection is hard to overcome too. Using PERL5LIB means  
> more work for the user, setting up in various places (nagios user's  
> profile on all monitored boxes, NRPE and Nagios start up scripts) - I  
> can envisage more support calls coming from this decision. I'm not  
> entirely convinced that using FindBin is that bad either - I think it  
> is equivalent to using LD_RUN_PATH, which some Solaris people use to  
> link to openssl (though admittedly, this is a decision they make at  
> compile time, not always in the code at execution time). I guess we  
> could have an option to strip out the "use lib" lines from the  
> plugins at make time - would that be sufficient?

I guess so. Though adding the code in if you're using local perl modules
seems cleaner. Maybe we just have something like this in the plugins:

  # use lib '/path/to/local/lib';

and uncomment and munge the lib path at install time? Is there benefit 
from doing a FindBin rather than just setting it lib outright?  
(Developers can just set PERL5LIB in their environments after all ...)

> I agree with Thomas that we always install N::P locally, though we  
> provide configure switches to turn off.
> 
> Is it fair to say we should proceed with the current plan?

Sounds like it.

> 
> BTW, I saw a link to http://search.cpan.org/~adamk/Module- 
> Install-0.65/lib/Module/Install/Bundle.pm which looks like it could  
> provide the answer to the nanocpan idea - we create a bundle called  
> Bundle::Nagios::Plugin which contains all the dependencies.

Yes, the Module::Install stuff looks good, assuming we can point the 
install at a non-standard-lib install location.


Cheers,
Gavin





More information about the Devel mailing list