Subject: | Bug: jmx4perl is returning [false] for Strings/Longs |
Date: | Sun, 27 Nov 2011 02:54:10 -0500 |
To: | bug-jmx4perl [...] rt.cpan.org |
From: | Haim Schoppik <hschoppik [...] gmail.com> |
OS: 64bit Ubuntu 10.04 LTS
perl 5.10.1
jmx4perl 1.03
plman@tron:~$ jmx4perl http://10.25.34.140:8888/jolokia read
java.lang:type=Runtime Uptime
[false]
plman@tron:~$ jmx4perl --verbose http://10.25.34.140:8888/jolokia read
java.lang:type=Runtime Uptime
GET http://10.25.34.140:8888/jolokia/read/java.lang%3Atype%3DRuntime/Uptime
===========================================================
HTTP/1.1 200 OK
Connection: close
Date: Sun, 27 Nov 2011 07:49:34 GMT
Server: Jetty(7.4.5.v20110725)
Content-Type: text/plain;charset=UTF-8
Client-Date: Sun, 27 Nov 2011 07:49:34 GMT
Client-Peer: 10.25.34.140:8888
Client-Response-Num: 1
{"timestamp":1322380174,"status":200,"request":{"mbean":"java.lang:type=Runtime","attribute":"Uptime","type":"read"},"value":2755596}
===========================================================
[false]
When I tried writing a quick program using JMX it seemed to work fine?
plman@tron:/var/tmp/sad$ cat sad.pl
#!/usr/bin/perl
use Data::Dumper;
use JMX::Jmx4Perl;
use JMX::Jmx4Perl::Request;
my $jmx = new JMX::Jmx4Perl(url => "http://10.25.34.140:8888/jolokia",
product => "jetty");
my $request = new JMX::Jmx4Perl::Request({type => READ,
mbean => "java.lang:type=Runtime",
attribute => "Uptime"});
my $response = $jmx->request($request);
print "Uptime: ",$response->value(),"\n";
plman@tron:/var/tmp/sad$ ./sad.pl
Uptime: 2836702
Any thoughts? Need for information? Let me know, and thanks in
advance for what I hope will be an incredibly useful tool.
- H