Check_NTP (embedded perl) Problem

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Tue May 13 06:48:50 CEST 2003


Dear Sir,

I am writing to thank you for your letter and your unusually clear 
presentation of the problem,

On Mon, May 12, 2003 at 02:20:57PM -0600, Kevin Stussman wrote:
> Have been using Netsaint / Nagios for a while now (thank you very much!)
> but our recent migration to Redhat 9 and Nagios 1.0 has a few problems:
> 
> ---------
> Problem 1
> ---------
> 1. I cannot get the check_ntp perl script to work properly inside of
> nagios. For example, the command run by itself works fine:
> 
> # ./check_ntp -H jessie
> NTP OK: Offset -0.001372 secs, jitter 2.986 msec, peer is stratum 3
> 
> Now when I start up nagios:
> 
> [1052766953] SERVICE ALERT: jessie;Simple NTP Service
> Response;CRITICAL;SOFT;1;(No output!)
> 
> I *believe* this has to do with embedded perl. So I decided to turn
> off embedded perl...which brings me to problem number two:
>

It may.

'No output!' is the catch all message for plugins that abend or 
otherwise fail to output any result.

Things to check are the standard things for Perl plugin

. utils.pm is in a place where Perl can find it (see perl -V to see the 
@INC var containing the paths it looks)

. argument/option mismatch between the plugin and what is coded in 
checkcommands.cfg and services.cfg

. try Patricks suggestion of wrapping the plugin in a shell wrapper that 
echos useful things (like arguments, output etc etc) to the file system 
and give this to Nag to run.

. try building the mini_epn in contrib/ (the Nagios contrib not the 
plugins) and try running it there. 

If it fails, it probably _is_ an ePN prob. However, this is unlikely 
since I think all the standard plugins are ePN aware (extra coding 
restrictions).


About ePN, I have some questions about your environment.

RH 9 ships with (AFAIK) a (threaded 5.8.0) Perl known to cause fatal 
problems with Nag - it will not start.

Please would you send me the output of perl -V and explain anything
extraordinary you had to do to get it to run at all with ePN ?

 
> ---------
> Problem 2
> ---------
> 2. No matter how I try from the command line, I cannot turn off embedded
> perl. I use this command line configure (I tried a lot of combinations):
> 
> ./configure --prefix=/monitor/nagios --with-nagios-user=nagios
> --with-nagios-group=nagios  --with-command-user=nagioscmd
> --with-cgiurl=/monitor/nagios/cgi-bin --with-htmurl=/nagios
> --enable-embedded-perl=no --disable-embedded-perl
> --without-embedded-perl 
> 
> and the results are:
> *** Configuration summary for nagios 1.0 11-24-2002 ***:
> 
>  General Options:
>  -------------------------
>         Nagios executable:  nagios
>         Nagios user/group:  nagios,nagios
>        Command user/group:  nagioscmd,nagios
>             Embedded Perl:  yes, without caching
>         Install ${prefix}:  /monitor/nagios
>                 Lock file:  ${prefix}/var/nagios.lock
>            Init directory:  /etc/rc.d/init.d
> 

This puzzles me. The only way you get Nag build with an embedded Perl is 
_with_ the option to configure.

(eg

tsitc> grep -i embedded -3 build//nagios-1.0/configure

USEPERL=no;
INSTALLPERLSTUFF=no;
# Check whether --enable-embedded-perl or --disable-embedded-perl was 
given.
if test "${enable_embedded_perl+set}" = set; then
  enableval="$enable_embedded_perl"
  
        cat >> confdefs.h <<EOF
#define EMBEDDEDPERL 1
EOF
)


If you leave the option out, no Perl interpreter is built into the 
binary (ie no --enable-embedded-perl option, no ePN).

Perhaps configure used the former cached values (in config.status) ? 

I recommend a make clean after changing the options to configure.


> The only solution was to hack configure to force a no embedded
> version.....but unfortunately, I still get a version of nagios
> that does not like the check_ntp command output. 



> 
> Any help appreciated.
> 
> Regards,
> 
> Kevin.
> 
> Nagios : 1.0 and 1.0b6
> Plugins : nagios-plugins-1.3.0-beta3
> Linux : Linux rex 2.4.20-9 #1 Wed Apr 2 13:42:50 EST 2003 i686 i686 i386
> GNU/Linux
> GCC : gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
> 

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


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list