[Nagiosplug-devel] Nagios:Plugin feedback

Thomas Guyot-Sionnest dermoth at aei.ca
Fri Jan 19 13:27:44 CET 2007


On 19/01/07 04:05 AM, Ton Voon wrote:
> 
> On 19 Jan 2007, at 03:46, Gavin Carr wrote:
> 
>>> Is there a is_hostname function? is_ipaddr would be useful as well.
>>>
>>> What about passing argument check code directly in the add_arg()
>>> arguments?
>>>
>>>
>>
>> My feeling is that we wouldn't add datatype stuff to Nagios::Plugin, 
>>
>> largely because it's pretty well covered already in other CPAN modules.
>>
> 
> Agreed. CPAN is about reusing other bits of code. However, some pointers
> to "good implementations" in CPAN might be helpful.
> 
> Longer term, we probably need to think about how to handle module
> dependencies for a given check_* script. Distributing a plugin to 100
> boxes might prove problematic if there is a large list of dependencies.

There's many useful functions in the C API for Nagios plugins. I believe
it wouldn't be a bad idea to have the same kind of function directly
into Nagios::Plugin. By minimizing the use of external modules, you
simplify plugin deployment.

Nagios::Plugin could itself load external modules to do the checks, but
those dependencies would be installed along with Nagios::Plugin.

What I'm starting to realize is that there's nothing to check the
validity of arguments. In C you have all those functions:

is_integer
is_intpos
is_intneg
is_intnonneg
is_intpercent
is_numeric
is_positive
is_negative
is_nonnegative
is_percentage


Thomas




More information about the Devel mailing list