[Nagios-users] Re: Perl problems in Nagios 2.0a1 (Tom DE BLENDE (GCC))

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Tue Aug 17 11:36:56 CEST 2004


Dear Sir,

I am writing to thank you for your letter and say,

On Tue, Aug 17, 2004 at 09:26:00AM +0200, Tom DE BLENDE (GCC) wrote:
> Dear Stanley,
> 
> Thank you for your reply. I double checked configure options, and I am 
> pretty certain that I don't have ePN compiled into Nagios. Yet every 
> Perl plugin returns No Output...
>

> As suggested I moved this topic to devel as it is about 2.0a1.
>

Some preliminary unhelpful comments :-

1 perldoc p1.pl is not so suckey (hey, may even please the docco abusers 
on Nag users) but I think this has nothing to do with ePN since you got 
rid of it.

2 the code in the CVS tarball/checks.c looks relatively familiar; looks 
like the same code (except re-init Perl interp, .. back-patch) I am 
using happily in 1.2.

Is this what you are using ?
 
> Kind regards,
> Tom

Some more germane but as unhelpful remarks

Are the exec bits (modes) set on your Perl plugins ? - pretty lame I 
know ..

No output! comes from the popen() path. Can your Nag user fork /bin/sh ? 

If these dopey questions don't shed any light then you need to start 
debugging.

1 To find out what's breaking you need to compile Nag with DEBUG1 (see 
the configure help to find how to do this), then run Nag in foreground 
and catch the output.

If you don't like this option, then gdb (much harder) is the only other 
apart from wrapping your plugins in a /bin/sh wrapper (see an earlier 
[corrected] post of mine for how to do this, although others have prob 
written more carefully/helpfully)

you need something like

mv prob_plugin wrapped_plugin
cat > prob_plugin
#!/bin/sh

printf `date` "prob_plugin: plugin entered.\n"
printf `wrapped_plugin 2>&1`
printf `date`, "prob_plugin: plugin left"
exit 0
# feel free to this better ... print $$ etc
^D

Anyway, I am sure you know better how to do this than I.

Good luck.

Yours sincerely.

-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285




More information about the Developers mailing list