|
|||||||||||
|
Re: [Nagiosplug-help] How to verify if nagios was built with embperl?
From: Tal Cohen <nagios(at)cohen123.com>
Date: Mon Sep 24 2007 - 09:32:45 EDT
While I am no expert, here are some thoughts that I hope will be helpful:
Are you getting any additional output when running this as a Nagios check?
Also, I notice that you are using "exit 3" instead of importing %ERRORS from utils.pm and using "exit $ERRORS{'UNKNOWN')". If I remember how EPN work right, by using exit 3, you actually exit the EPN environment (which is not what you want). By using the %ERRORS hash instead, you remain within EPN. Last, can you post the entire check to the group? We may be able to identify the problem that way too. Tal
-----Original Message-----
Hello,
this is a follow-on to my posting to this list about inexplicable
UNKNOWN state determination
Unfortunately, no one seemed interested enough to reply. However, meanwhile I think to have traced down the culprit. It seems to be my convenience definition of a __DIE__ signal handler in my plugin. I defined this vileness in my code $SIG{__DIE__} = sub { chomp(my $out = shift);
printf "%s - %s\n",
$NAGIOS_SERVICESTATE{3}, $out;
exit 3
};
as a sort of catch all abnomalies which I could catch as usual by an or-ed die.
As shown in my last posting (see below)
As soon as I comment the above sigdie handler out the plugin
shows
Since the %SIG hash is a package global
I suspect that my nagios binary was built with some embperl
support
I haven't built nagios from the sources but for ease of
installation
So, how can I verify that my nagios binary indeed is precaching
Perl plugins
When I look at the shared libs there is a reference to some
libperl
# rpm -q nagios
# uname -r
# cat /etc/redhat-release
# ldd /usr/sbin/nagios
linux-gate.so.1 => (0x00631000)
libperl.so =>
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so (0x00110000)
libresolv.so.2 => /lib/libresolv.so.2 (0x008a7000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00708000)
libdl.so.2 => /lib/libdl.so.2 (0x004ac000)
libm.so.6 => /lib/libm.so.6 (0x00483000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x046f2000)
libutil.so.1 => /lib/libutil.so.1 (0x00df8000)
libpthread.so.0 => /lib/libpthread.so.0 (0x004b2000)
libc.so.6 => /lib/libc.so.6 (0x00344000)
/lib/ld-linux.so.2 (0x00327000)
Regards Ralph > -----Original Message----- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ Nagiosplug-help mailing list Nagiosplug-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-help ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ Nagiosplug-help mailing list Nagiosplug-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-help ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null Received on Mon Sep 24 09:32:59 2007 This archive was generated by hypermail 2.1.8 : Mon Oct 08 2007 - 18:06:11 EDT |
||||||||||
|
|||||||||||