Ich möchte eine Instanz von Hornetq 2.4.0 mit dem check_jmx Plugin für Nagios gefunden here zu überwachen. Nachdem ich es mit ant baute ich es wie so nennen kann:
Überprüfen Sie mbean Wert auf Hornetq durch jmx
./check_jmx -U service:jmx:rmi:///jndi/rmi://127.0.0.1:6000/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 4248302272 -c 5498760192
Und diese Ausgabe erhalten:
JMX OK HeapMemoryUsage.used = 189.815.504 {begangen = 534773760; init = 536870912 ; max = 956301312; verwendet = 189815504}
Aber wenn ich versuchen, diese:
./check_jmx -U service:jmx:rmi:///jndi/rmi://127.0.0.1:6000/jmxrmi -O java.lang:type=MemoryPool,name="PS Eden Space" -A Usage -I Usage -K used -J used -vvv -w 4248302272 -c 5498760192
Ich erhalte eine Ausnahme:
JMX CRITICAL java.lang:type=MemoryPool,name=PS connecting to java.lang:type=MemoryPool,name=PS by URL service:jmx:rmi:///jndi/rmi://192.168.9.39:6000/jmxrmijavax.management.InstanceNotFoundException: java.lang:type=MemoryPool,name=PS
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:643)
at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1448)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1312)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1404)
at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:641)
at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$64(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:903)
at org.nagios.JMXQuery.execute(JMXQuery.java:184)
at org.nagios.JMXQuery.main(JMXQuery.java:76)
Kann ich dieses Tool verwenden, diesen Wert zu erhalten oder gibt es ein anderes Werkzeug, das ich die „PS Eden Space“ mit bekommen?