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

Andreas Ericsson ae at op5.se
Wed Jan 3 11:27:28 CET 2007


Florian Gleixner wrote:
> True, leaks and crashes could make nagios more unstable. dl-plugins
> should be used with care. "Worker threads" could isolate some of the risk.
> 
> The performance gain is simply the time a C plugin needs to create a
> process. You could say, that this is not very much time, but some nagios
> setups make thousands of checks per minute. Here is a very simple test:
> The bash has the echo command build in. On most linux systems you will
> find a /bin/echo program with same functionality too. So compare:
> 
> time for ((i=0 ; i< 10000 ; i++)) ; do echo bla ; done
> real    0m1.536s
> user    0m0.172s
> sys     0m0.020s
> 
> time for ((i=0 ; i< 10000 ; i++)) ; do /bin/echo bla ; done
> real    0m34.047s
> user    0m8.761s
> sys     0m15.365s
> 
> I think some default plugins like ping or tcp-check could be made as dl
> module, the more complicated or the plugins that are usually executed at
> the monitored nodes should be "normal" plugins.
> 
> I never had a look at the nagios code, it was just a idea popping up.
> 

A lower hanging apple is to make Nagios use fork() / execve() instead of 
using popen(), which does a double fork() / exec() thing.

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