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

Ethan Galstad nagios at nagios.org
Fri Dec 22 00:39:41 CET 2006


Gavin Carr wrote:
> On Thu, Dec 21, 2006 at 08:10:58PM +0100, Tobias Klausmann wrote:
>> On Thu, 21 Dec 2006, Ethan Galstad wrote:
>>> Line 2 of a Perl plugin may start with one of the following:
>>>
>>> #USE_EPN
>>>
>>> -or-
>>>
>>> #NO_EPN
>>>
>>> Plugin devs - would you prefer different statements other than #USE_EPN 
>>> / #NO_EPN, or are they okay?  Any other comments or suggestions?
>> I'd go for a more namespace-like approach:
>>
>> # Nagios: use_epn
>> vs.
>> # Nagios: no_epn
> 
> +1 on the Nagios: (or nagios:) label.
> 
>> also, it'd be nicer maybe to use more similar positive/negative
>> flags, for example +epn/-epn.
>>
>> So, in all:
>>
>> # Nagios: +epn
>> vs.
>> # Nagios: -epn
>>
>> In the future, one could add more execution hints like this:
>>
>> # Nagios: -epn,+foo,-multithreaded,+volatile
> 
> I don't much mind USE_EPN/NO_EPN (or use_epn/no_epn maybe) or +epn/-epn.
> I quite like the idea Tobias' general idea though - you end up with 
> something like vim modelines:
> 
> # vim:et:sw=2:ai:sm
> 
> I'd quite like some flexibility about location too. Would it be much work
> to allow the tags to occur anywhere within the first or last 1024 bytes
> of the file, say?
> 
> 
> Cheers,
> Gavin
> 

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?

Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org




More information about the Devel mailing list