[Nagiosplug-devel] RFC: Nagios 3 and Embedded Perl Plugins

Andreas Ericsson ae at op5.se
Wed Jan 3 11:24:54 CET 2007


Ethan Galstad wrote:
> Ton Voon wrote:
>> On 21 Dec 2006, at 23:39, Ethan Galstad wrote:
>>
>>> I like Tobias' suggestion as well.
>>>
>>> As far as flexible location, that could be arranged.  Limiting its 
>>> location the the beginning X lines of the plugin would be far easier 
>>> that figuring out how many lines the plugin has and working backwards. 
>>> In order to reduce overhead/increase speed of detection the keywords, I 
>>> would suggest we limit the possible location to the first 100 lines or 
>>> less.
>>>
>>> Ton, Benoit, others... does this sound okay?
>> Sorry, I've stayed quiet on this because I don't use epn, so don't 
>> necessarily understand the issues. I know Gavin Carr uses epn, but I'm 
>> not sure who else currently on the plugin team.
>>
>> My British penny (just less than two cents) says: vim style comments; 
>> limit macro to first 10 lines. Maybe you could cache the plugin name 
>> (keyed on file location?) so that you don't need to keep re-reading the 
>> plugin?
>>
>> Ton
> 
> Okay, CVS code now supports the following two incantations in the 
> 2nd-10th lines of Perl plugins:
> 
> # nagios:+epn
> 
> # nagios:-epn
> 
> 
> Its probably better to cache the plugin directives as you mentioned, so 
> I'll take a look at doing that.  Although I can see it would be useful 
> to allow people to tweak plugin directives without having to restart Nagios.
> 

Definitely. I'd say you'd be better off saving yourself the trouble of 
exception handling and hashed caches by simply doing the check every 
time the plugin is run.

-- 
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