check_jmx plugin chokes on more than 2Gb memory

Adam Serediuk serediuk at gmail.com
Thu Mar 19 00:14:16 CET 2009


Old message, but I had the same problem. check_jmx  was built using  
Integer's for numbers and the Java Integer type is not able to handle  
values larger than 2^31-1(2147483647.) When you pass a value larger  
than this NumberFormatException is thrown. I have no idea who the  
original author is, but the source code was with the bundle I  
downloaded so I've updated it to use a Long rather than an Integer and  
values up to 2^63-1 are now supported.

I have uploaded the patched version to NagiosExchange at http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F3002.html;d=1

Hope it helps.

Adam Serediuk
serediuk at gmail.com


 > This works:
 > [nagios at monitor1 libexec]$ ./check_jmx -U
 > service:jmx:rmi:///jndi/rmi://server:9000/jmxrmi -O
 > java.lang:type=Memory -A HeapMemoryUsage -K used -w 2147483647
 >
 > JMX CRITICAL HeapMemoryUsage.used=-1942171464
 >
 > But this doesn't:
 > [nagios at monitor1 libexec]$ ./check_jmx -U
 > service:jmx:rmi:///jndi/rmi://server:9000/jmxrmi -O
 > java.lang:type=Memory -A HeapMemoryUsage -K used -w 2147483648
 >
 > JMX UNKNOWN For input string: "2147483648" Usage: check_jmx -help
 >
 > Does anyone have source code for jmxquery.jar? Or perhaps a newer
 > version that can cope with larger heap size?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090318/51d89b29/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
-------------- next part --------------
_______________________________________________
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