Skip Menu |

This queue is for tickets about the jmx4perl CPAN distribution.

Report information
The Basics
Id: 47456
Status: resolved
Priority: 0/
Queue: jmx4perl

People
Owner: roland [...] cpan.org
Requestors: bruhacs [...] flexlyrics.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: check_jmx4perl does not run in ePN environment
Date: Tue, 30 Jun 2009 12:48:19 +0200
To: bug-jmx4perl [...] rt.cpan.org
From: Lorand Bruhacs <bruhacs [...] flexlyrics.com>
When running check_jmx4perl in ePN, it errors with "**ePN /usr/lib64/nagios/plugins/check_jmx4perl: "Subroutine Nagios::Plugin::Functions::get_shortname redefined at (eval 2) line 66" Platform: Nagios 3.0.6 with ePN on Fedora 11 (x86_64) The plugin runs correctly when ePN is disabled.
Indeed, this is a warning echoed when 'use warnings' is active (as it seems to be true for ePN). But it should be a warning only which shouldn't affect the proper working of check_jmx4perl. Can you verify this please ? For the forthcoming 0.21, which is scheduled for the end of this week, this warning is disabled (but 'use warnings' is included for the rest) FYI, this 'hack' is used to fine tune the appearing of the plugin's output in order to start the line directly with the status OK, CRITICAL, .... without any disturbing prefix.
Subject: Re: [rt.cpan.org #47456] check_jmx4perl does not run in ePN environment
Date: Tue, 30 Jun 2009 14:24:06 +0200
To: bug-jmx4perl [...] rt.cpan.org
From: Lorand Bruhacs <bruhacs [...] flexlyrics.com>
Actually this issue does affect the behavior of check_jmx4perl - when called as a Nagios checkcommand, it returns status UNKNOWN. Running with '# nagios -epn' is no big deal if you're only using it for a couple of services, but if you're doing heavy checking (which eventually I will be), I imagine that epn would matter quite a bit performance-wise. On Jun 30, 2009, at 13:29 PM, Roland Huss via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=47456 > > > Indeed, this is a warning echoed when 'use warnings' is active (as > it seems to be true for ePN). > But it should be a warning only which shouldn't affect the proper > working of check_jmx4perl. > Can you verify this please ? > > For the forthcoming 0.21, which is scheduled for the end of this > week, this warning is disabled > (but 'use warnings' is included for the rest) > > FYI, this 'hack' is used to fine tune the appearing of the plugin's > output in order to start the line > directly with the status OK, CRITICAL, .... without any disturbing > prefix. >
ok, this seems to be more than a simple warning issue. I need to get hold on a Nagios Installation with Perl compiled in for making some test. Stay tuned ... ;-)
I (hopefully) fixed all issues related with running check_jmx4perl from within ePN. Please download Version 0.21_1 from http://search.cpan.org/CPAN/authors/id/R/RO/ROLAND/jmx4perl-0.21_1.tar.gz and give it a try. If it works for you, I would like to make a 0.21 release on friday. Thanks a lot for you investigation ...
Subject: Re: [rt.cpan.org #47456] check_jmx4perl does not run in ePN environment
Date: Wed, 1 Jul 2009 20:38:12 +0200
To: bug-jmx4perl [...] rt.cpan.org
From: Lorand Bruhacs <bruhacs [...] flexlyrics.com>
Hi Roland, Thanks for the fix... I'll take it for a spin tomorrow morning and see whether it does the trick. Best Wishes, Lorand On Jul 1, 2009, at 15:01 PM, Roland Huss via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=47456 > > > I (hopefully) fixed all issues related with running check_jmx4perl > from > within ePN. Please download Version 0.21_1 from > http://search.cpan.org/CPAN/authors/id/R/RO/ROLAND/jmx4perl-0.21_1.tar.gz > and > give it a try. If it works for you, I would like to make a 0.21 > release > on friday. > > Thanks a lot for you investigation ...
Subject: Re: [rt.cpan.org #47456] check_jmx4perl does not run in ePN environment
Date: Thu, 2 Jul 2009 10:32:09 +0200
To: bug-jmx4perl [...] rt.cpan.org
From: Lorand Bruhacs <bruhacs [...] flexlyrics.com>
Manually running the 0.21_1 check_jmx4perl Nagios plugin from the command line seems to work ok: $ ./check_jmx4perl --url http://foobar.flexlyrics.com:8080/j4p --name memory_used --mbean java.lang:type=Memory --attribute HeapMemoryUsage --path used --warning 60000 --critical 50000000 WARNING - memory_used : Threshold 60000 failed for value 43083072 | memory_used=43083072;60000;50000000 But having Nagios run the same check from a service definition results in a CRITICAL (service check did not exit properly). Turning off ePN in check_jmx4perl lets the Nagios check run properly. On Jul 1, 2009, at 15:01 PM, Roland Huss via RT wrote: Show quoted text
Thanks for trying check_jmx4perl. I will try to reproduce it on my Nagios installation, my latest tests seemed to work properly with critical values in ePN. What version of Nagios are you using in what environment ?
Subject: Re: [rt.cpan.org #47456] check_jmx4perl does not run in ePN environment
Date: Thu, 2 Jul 2009 10:46:58 +0200
To: bug-jmx4perl [...] rt.cpan.org
From: Lorand Bruhacs <bruhacs [...] flexlyrics.com>
I'm using a stock Nagios 3.0.6 install on Fedora 11 x86_64 (from yum pkg: nagios-3.0.6-3.fc11.x86_64 ). On Jul 2, 2009, at 10:40 PM, Roland Huss via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=47456 > > > Thanks for trying check_jmx4perl. I will try to reproduce it on my > Nagios installation, my latest > tests seemed to work properly with critical values in ePN. What > version of Nagios are you using > in what environment ?
Unfortunately I can't reproduce the error (Nagios 3.0.6, Debian 32bit, 2.6.26) (see attachted screenshot). I verified that that the embedded Perl interpreter is switched on and compiled in 11:24:19 atlantis [~] # ldd `which nagios3 ` linux-gate.so.1 => (0xb7f37000) libperl.so.5.10 => /usr/lib/libperl.so.5.10 (0xb7dde000) libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7dda000) libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7db4000) libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7d9b000) libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7c3a000) libcrypt.so.1 => /lib/i686/cmov/libcrypt.so.1 (0xb7c07000) /lib/ld-linux.so.2 (0xb7f38000) 11:24:25 atlantis [~] # grep perl /etc/nagios3/nagios.cfg # This value determines where the p1.pl perl script (used by the enable_embedded_perl=1 use_embedded_perl_implicitly=1 Do you have any other debugging output for me beside "(service check did not exit properly)" ?
Download Picture 1.png
image/png 29.1k
Picture 1.png
Subject: Re: [rt.cpan.org #47456] check_jmx4perl does not run in ePN environment
Date: Thu, 2 Jul 2009 11:45:47 +0200
To: bug-jmx4perl [...] rt.cpan.org
From: Lorand Bruhacs <bruhacs [...] flexlyrics.com>
Good point about the embedded Perl interpreter. I just went and verified that it is in fact compiled in and turned on in nagios.cfg. My embedded perl looks to be a bit different than yours though: $ ldd `which nagios` linux-vdso.so.1 => (0x00007fff75796000) libperl.so => /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE/ libperl.so (0x00007f666d2f2000) libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003f4be00000) libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003f50a00000) libdl.so.2 => /lib64/libdl.so.2 (0x0000003f42000000) libm.so.6 => /lib64/libm.so.6 (0x0000003f41c00000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f666d0a2000) libutil.so.1 => /lib64/libutil.so.1 (0x0000003f50200000) libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003f42400000) libc.so.6 => /lib64/libc.so.6 (0x0000003f41800000) /lib64/ld-linux-x86-64.so.2 (0x0000003f41400000) libfreebl3.so => /lib64/libfreebl3.so (0x00007f666ce43000) I'll have to find out how to turn up the logging verbosity- my nagios.log doesn't contain any useful information on the error. On Jul 2, 2009, at 11:27 PM, Roland Huss via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=47456 > > > Unfortunately I can't reproduce the error (Nagios 3.0.6, Debian > 32bit, 2.6.26) (see attachted > screenshot). I verified that that the embedded Perl interpreter is > switched on and compiled in > > 11:24:19 atlantis [~] # ldd `which nagios3 ` > linux-gate.so.1 => (0xb7f37000) > libperl.so.5.10 => /usr/lib/libperl.so.5.10 (0xb7dde000) > libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7dda000) > libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7db4000) > libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7d9b000) > libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7c3a000) > libcrypt.so.1 => /lib/i686/cmov/libcrypt.so.1 (0xb7c07000) > /lib/ld-linux.so.2 (0xb7f38000) > 11:24:25 atlantis [~] # grep perl /etc/nagios3/nagios.cfg > # This value determines where the p1.pl perl script (used by the > enable_embedded_perl=1 > use_embedded_perl_implicitly=1 > > Do you have any other debugging output for me beside "(service check > did not exit properly)" > ? > <Picture 1.png>
Hi, I'm afraid, tings get harder now. I love non-reproducable bugs ;-) You could help me by trying the following: 1. Please use as check command simply 'check_jmx4perl --version'. Just to be sure that we are testing the right script. The output in the Nagios Console should be '0.21_1'. Just to be on the save side. 2. Next, use the original check command and edit p1.pl, which is the startup script for the perl plugins. Usually it is located at /usr/lib/nagios/p1.pl. Enable the commented out line #17 to enable full debug and restart nagios. You might want to adapt the $DEBUG_PATH as well. After running some checks, you should find various debug files in this directory. Could you please post these ones ? (or send it to roland@cpan.org directly) Thanks a lot !
As it seems to work now (private communications), I'm going to close this ticket now. jmx4perl seems to work properly with ePN. The issue is fixed in 0.21