Mistake in Nagios documentation about embedded perl ???

Yann Jouanin yann.jouanin.list at intelunix.fr
Wed Mar 4 08:36:35 CET 2009


Ok, I understood the code correctly.
The thing surprising in the documentation is the schema could make think the
parent Nagios process is directly executing EPN. That was a scaring point
for me. 
I just think the fact Nagios fork before executing code with epn should be
mentioned.

Thank for your answer

Yann Jouanin

http://www.yannj.fr

-----Message d'origine-----
De : frank [mailto:ratty at they.org] 
Envoyé : mercredi 4 mars 2009 02:52
À : Nagios Developers List
Objet : Re: [Nagios-devel] Mistake in Nagios documentation about embedded
perl ???

The docs may not be crystal clear but I'd say they're far from wrong.

Every plugin is run as a fork. The keywords here are "and executing the
plugins as an external command." With ePN the perl code can be run without
having to instantiate an entire perl process (including compiling the script
code and loading any necessary modules and libraries) which is a much
heavier operation than calling a library function that is already loaded
into memory (as well as the precompiled script code).

Notice that when running an ePN plugin, the process is still named "nagios"
in ps(1) or top(1) output. Without ePN the process would be named "perl" or
perhaps the name of your script.

-f

On Wed, 4 Mar 2009, Yann Jouanin wrote:

> Date: Wed, 4 Mar 2009 01:00:59 +0100
> From: Yann Jouanin <yann.jouanin.list at intelunix.fr>
> Reply-To: Nagios Developers List <nagios-devel at lists.sourceforge.net>
> To: 'Nagios Developers List' <nagios-devel at lists.sourceforge.net>
> Subject: [Nagios-devel] Mistake in Nagios documentation about embedded
perl
>     ???
> 
> 
> Hello everyone,
> 
>  
> 
> I was surprised to read this phrase in the nagios documentation about
embedded perl :
> 
>  
> 
> ?Without the embedded Perl interpreter, Nagios executes Perl (and 
> non-Perl) plugins by forking and executing the plugins as an external 
> command. When the embedded Perl interpreter is used, Nagios can 
> execute Perl plugins by simply making a library call. >>
> 
> http://nagios.sourceforge.net/docs/3_0/passivechecks.html
> 
>  
> 
> If I had read correctly the code in base/checks.c, Nagios compile the 
> plugin code using EPN, then fork and execute the previously compiled
script.
> 
> Otherwise I guess a perl script with an infinity loop would make Nagios
stucks.
> 
>  
> 
> Am I wrong?
> 
>  
> 
>  
> 
> Yann Jouanin
> 
>  
> 
> http://www.yannj.fr
> 
>  
> 
> 
>


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H




More information about the Developers mailing list