Ad Widget

Collapse

can't monitoring the JMX application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fishrui
    Junior Member
    • Apr 2011
    • 1

    #1

    can't monitoring the JMX application

    Zabbix version 1.9.3
    The Zabbix server is running on host 192.168.6.2,the JMX configure in zabbix_server.conf is :
    Code:
        JavaProxy=192.168.6.3
        JavaProxyPort=10051
    The Java Proxy is running on host 192.168.6.3,the configure is :
    Code:
        LISTEN_IP="192.168.6.3"
        LISTEN_PORT=10051
        PID_FILE="/tmp/zabbix_java.pid"
    The JMX application is running on 192.168.6.3,the jmxremote port is 9999.It works correctly with Jconsole.

    The GUI configure is :
    Code:
    Host interface:192.168.6.3:9999
    Type:JMX agent
    Key:jmx["java.lang:type=Memory","HeapMemoryUsage.used"]
    In Monitoring-Overview panel zabbix can't get the result. how should I do ?
  • zabbix_jmx_tester
    Junior Member
    • Aug 2011
    • 1

    #2
    Memory Usage monitoring using JMX on v1.9.5

    How can I monitor JVM memory usage per pool using JMX?

    The following doesn't seem to work. It complains -"required key format: jmx[<object name>,<attribute name>]"

    jmx["java.lang:type=MemoryPool,name=PS Old Gen","Usage.used"]
    jmx[java.lang:type=MemoryPool,name=PS Old Gen,Usage.used]
    jmx[java.lang:type=MemoryPool,name=PS Old Gen][Usage.used]


    But the following works fine
    jmx[java.lang:type=Threading, PeakThreadCount]
    jmx[java.lang:type=Threading, ThreadCount]

    Comment

    • eskytthe
      Senior Member
      Zabbix Certified Specialist
      • May 2011
      • 363

      #3
      I use:
      jmx[java.lang:type=MemoryPool,name=PS Old Gen][Usage.used]
      jmx[java.lang:type=MemoryPool,name=PS Old Gen][Usage.max]
      jmx[java.lang:type=MemoryPool,name=PS Old Gen][Usage.committed]
      etc.
      all from the included "Template Java" in zabbix (appliance)
      BR
      Erik

      Comment

      • ev0ldave
        Junior Member
        • Dec 2011
        • 5

        #4
        can't monitoring a JMX application with quotes in the objectName

        Old thread but related issue:

        The java templates have a format of:

        jmx[objectName][Attribute]

        This format could fix my issue but the system complains of an unsupported format.

        Zabbix Version: 1.9.8

        DEBUG com.zabbix.gateway.ItemChecker - caught exception for item 'jmx[com.pointserve.preprocessor.camel:context=prodtnt-pie/camel,type=routes,name="danlaw.file.processing.pro dtntgpsd"][ExchangesCompleted]'
        com.zabbix.gateway.ZabbixException: required key format: jmx[<object name>,<attribute name>]

        If the names need to be surrounded in quotes, what format would be acceptable to monitor the above object that contains quotes in the above object name?

        Comment

        • ev0ldave
          Junior Member
          • Dec 2011
          • 5

          #5
          can't monitoring the JMX application

          For future use of anyone, you can escape the quotes in the objectName

          jmx["com.pointserve.preprocessor.camel:context=pro dtnt-pie/camel,type=routes,name=\"danlaw.file.processing.pr o dtntgpsd\"","ExchangesCompleted"]

          Comment

          • dmltn84
            Junior Member
            • Jan 2012
            • 11

            #6
            com.zabbix.gateway.SocketProcessor - error processing request

            Hello All,

            I am trying to configure JBoss monitoring using Zabbix Java Gateway.

            1.I have set JavaGateway and JavaGatewayPort in zabbix_server.conf

            2. I have set item type to "JMX Agent" (default "Zabbix Agent" resulted in host unreachable trigger) with port 8083

            3. Zabbix Java Gateway is up on the monitored host listening on 0.0.0.0:10052

            4. JAVA_OPTS for Jboss contains -Dcom.sun.management.jmxremote option

            After server and jboss restart I get following message, which is probably configuration related, however I wasn't able to find any hint in Zabbix Manual 2.0:

            Code:
            2012-01-18 16:11:10.403 [pool-1-thread-3] DEBUG com.zabbix.gateway.SocketProcessor - finished processing incoming connection
            2012-01-18 16:12:11.243 [pool-1-thread-5] DEBUG com.zabbix.gateway.SocketProcessor - starting to process incoming connection
            2012-01-18 16:12:11.243 [pool-1-thread-1] DEBUG com.zabbix.gateway.SocketProcessor - starting to process incoming connection
            2012-01-18 16:12:11.243 [pool-1-thread-1] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading Zabbix protocol header
            2012-01-18 16:12:11.243 [pool-1-thread-5] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading Zabbix protocol header
            2012-01-18 16:12:11.243 [pool-1-thread-1] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 8 bytes of data length
            2012-01-18 16:12:11.243 [pool-1-thread-5] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 8 bytes of data length
            2012-01-18 16:12:11.243 [pool-1-thread-1] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 417 bytes of request data
            2012-01-18 16:12:11.243 [pool-1-thread-5] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 2100 bytes of request data
            2012-01-18 16:12:11.243 [pool-1-thread-1] DEBUG c.z.gateway.BinaryProtocolSpeaker - received the following data in request: {
            	"request":"java gateway jmx",
            	"conn":"10.10.10.10",
            	"port":8083,
            	"keys":["jmx[java.lang:type=GarbageCollector,name=PS MarkSweep][CollectionCount]","jmx[java.lang:type=GarbageCollector,name=PS MarkSweep][CollectionTime]","jmx[java.lang:type=MemoryPool,name=CMS Old Gen][Usage.used]","jmx[java.lang:type=ClassLoading][UnloadedClassCount]","jmx[java.lang:type=GarbageCollector,name=PS Scavenge][CollectionTime]"]}
            2012-01-18 16:12:11.243 [pool-1-thread-5] DEBUG c.z.gateway.BinaryProtocolSpeaker - received the following data in request: {
            	"request":"java gateway jmx",
            	"conn":"10.10.10.10",
            	"port":8083,
            	"keys":["jmx[java.lang:type=ClassLoading][LoadedClassCount]","jmx[java.lang:type=Compilation][TotalCompilationTime]","jmx[java.lang:type=MemoryPool,name=Tenured Gen][Usage.committed]","jmx[java.lang:type=MemoryPool,name=PS Perm Gen][Usage.used]","jmx[java.lang:type=GarbageCollector,name=ConcurrentMarkSweep][CollectionCount]","jmx[java.lang:type=Threading][TotalStartedThreadCount]","jmx[java.lang:type=MemoryPool,name=CMS Perm Gen][Usage.committed]","jmx[java.lang:type=MemoryPool,name=CMS Perm Gen][Usage.used]","jmx[java.lang:type=MemoryPool,name=PS Old Gen][Usage.committed]","jmx[java.lang:type=Threading][ThreadCount]","jmx[java.lang:type=Runtime][Uptime]","jmx[java.lang:type=MemoryPool,name=Perm Gen][Usage.committed]","jmx[java.lang:type=MemoryPool,name=Code Cache][Usage.committed]","jmx[java.lang:type=GarbageCollector,name=ConcurrentMarkSweep][CollectionTime]","jmx[java.lang:type=MemoryPool,name=Code Cache][Usage.used]","jmx[java.lang:type=Threading][DaemonThreadCount]","jmx[java.lang:type=GarbageCollector,name=Copy][CollectionCount]","jmx[java.lang:type=GarbageCollector,name=Copy][CollectionTime]","jmx[java.lang:type=GarbageCollector,name=MarkSweepCompact][CollectionCount]","jmx[java.lang:type=MemoryPool,name=Perm Gen][Usage.used]","jmx[java.lang:type=MemoryPool,name=CMS Old Gen][Usage.committed]","jmx[java.lang:type=Threading][PeakThreadCount]","jmx[java.lang:type=GarbageCollector,name=PS Scavenge][CollectionCount]","jmx[java.lang:type=OperatingSystem][OpenFileDescriptorCount]","jmx[java.lang:type=Memory][ObjectPendingFinalizationCount]","jmx[java.lang:type=MemoryPool,name=Tenured Gen][Usage.used]","jmx[java.lang:type=GarbageCollector,name=ParNew][CollectionCount]","jmx[java.lang:type=MemoryPool,name=PS Old Gen][Usage.used]","jmx[java.lang:type=GarbageCollector,name=MarkSweepCompact][CollectionTime]","jmx[java.lang:type=MemoryPool,name=PS Perm Gen][Usage.committed]","jmx[java.lang:type=ClassLoading][TotalLoadedClassCount]","jmx[java.lang:type=GarbageCollector,name=ParNew][CollectionTime]"]}
            2012-01-18 16:12:11.243 [pool-1-thread-1] DEBUG com.zabbix.gateway.SocketProcessor - dispatched request to class com.zabbix.gateway.JMXItemChecker
            2012-01-18 16:12:11.243 [pool-1-thread-1] DEBUG com.zabbix.gateway.JMXItemChecker - connecting to JMX agent at service:jmx:rmi:///jndi/rmi://10.10.10.10:8083/jmxrmi
            2012-01-18 16:12:11.244 [pool-1-thread-5] DEBUG com.zabbix.gateway.SocketProcessor - dispatched request to class com.zabbix.gateway.JMXItemChecker
            2012-01-18 16:12:11.244 [pool-1-thread-5] DEBUG com.zabbix.gateway.JMXItemChecker - connecting to JMX agent at service:jmx:rmi:///jndi/rmi://10.10.10.10:8083/jmxrmi
            2012-01-18 16:12:56.405 [pool-1-thread-4] DEBUG com.zabbix.gateway.SocketProcessor - starting to process incoming connection
            2012-01-18 16:12:56.405 [pool-1-thread-4] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading Zabbix protocol header
            2012-01-18 16:12:56.405 [pool-1-thread-4] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 8 bytes of data length
            2012-01-18 16:12:56.405 [pool-1-thread-4] DEBUG c.z.gateway.BinaryProtocolSpeaker - reading 134 bytes of request data
            2012-01-18 16:12:56.405 [pool-1-thread-4] DEBUG c.z.gateway.BinaryProtocolSpeaker - received the following data in request: {
            	"request":"java gateway jmx",
            	"conn":"10.10.10.10",
            	"port":8083,
            	"keys":["jmx[java.lang:type=ClassLoading][LoadedClassCount]"]}
            2012-01-18 16:12:56.405 [pool-1-thread-4] DEBUG com.zabbix.gateway.SocketProcessor - dispatched request to class com.zabbix.gateway.JMXItemChecker
            2012-01-18 16:12:56.406 [pool-1-thread-4] DEBUG com.zabbix.gateway.JMXItemChecker - connecting to JMX agent at service:jmx:rmi:///jndi/rmi://10.10.10.10:8083/jmxrmi
            2012-01-18 16:13:11.248 [pool-1-thread-1] WARN  com.zabbix.gateway.SocketProcessor - error processing request
            com.zabbix.gateway.ZabbixException: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
            	java.net.SocketTimeoutException: Read timed out]
            	at com.zabbix.gateway.JMXItemChecker.getValues(JMXItemChecker.java:100) ~[zabbix-java-gateway-1.9.8.jar:na]
            	at com.zabbix.gateway.SocketProcessor.run(SocketProcessor.java:63) ~[zabbix-java-gateway-1.9.8.jar:na]
            	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.6.0_20]
            	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.6.0_20]
            	at java.lang.Thread.run(Thread.java:636) [na:1.6.0_20]
            Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
            	java.net.SocketTimeoutException: Read timed out]
            	at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:342) ~[na:1.6.0_20]
            	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267) ~[na:1.6.0_20]
            	at com.zabbix.gateway.JMXItemChecker.getValues(JMXItemChecker.java:92) ~[zabbix-java-gateway-1.9.8.jar:na]
            	... 4 common frames omitted
            Caused by: javax.naming.CommunicationException: null
            	at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118) ~[na:1.6.0_20]
            	at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:203) ~[na:1.6.0_20]
            	at javax.naming.InitialContext.lookup(InitialContext.java:409) ~[na:1.6.0_20]
            	at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1902) ~[na:1.6.0_20]
            	at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1871) ~[na:1.6.0_20]
            	at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:276) ~[na:1.6.0_20]
            	... 6 common frames omitted
            Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
            	java.net.SocketTimeoutException: Read timed out
            	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:304) ~[na:1.6.0_20]
            	at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202) ~[na:1.6.0_20]
            	at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:340) ~[na:1.6.0_20]
            	at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) ~[na:1.6.0_20]
            	at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:114) ~[na:1.6.0_20]
            	... 11 common frames omitted
            Caused by: java.net.SocketTimeoutException: Read timed out
            	at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.6.0_20]
            	at java.net.SocketInputStream.read(SocketInputStream.java:146) ~[na:1.6.0_20]
            	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) ~[na:1.6.0_20]
            	at java.io.BufferedInputStream.read(BufferedInputStream.java:254) ~[na:1.6.0_20]
            	at java.io.DataInputStream.readByte(DataInputStream.java:265) ~[na:1.6.0_20]
            	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:246) ~[na:1.6.0_20]
            	... 15 common frames omitted
            2012-01-18 16:13:11.248 [pool-1-thread-1] DEBUG c.z.gateway.BinaryProtocolSpeaker - sending the following data in response: { "response" : "failed", "error" : "java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: \n\tjava.net.SocketTimeoutException: Read timed out]" }
            
            2012-01-18 16:13:11.249 [pool-1-thread-1] DEBUG com.zabbix.gateway.SocketProcessor - finished processing incoming connection
            2012-01-18 16:13:11.305 [pool-1-thread-5] WARN  com.zabbix.gateway.SocketProcessor - error processing request
            com.zabbix.gateway.ZabbixException: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
            	java.net.SocketTimeoutException: Read timed out]
            	at com.zabbix.gateway.JMXItemChecker.getValues(JMXItemChecker.java:100) ~[zabbix-java-gateway-1.9.8.jar:na]
            	at com.zabbix.gateway.SocketProcessor.run(SocketProcessor.java:63) ~[zabbix-java-gateway-1.9.8.jar:na]
            	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.6.0_20]
            	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.6.0_20]
            	at java.lang.Thread.run(Thread.java:636) [na:1.6.0_20]
            Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
            	java.net.SocketTimeoutException: Read timed out]
            	at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:342) ~[na:1.6.0_20]
            	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267) ~[na:1.6.0_20]
            	at com.zabbix.gateway.JMXItemChecker.getValues(JMXItemChecker.java:92) ~[zabbix-java-gateway-1.9.8.jar:na]
            	... 4 common frames omitted
            Caused by: javax.naming.CommunicationException: null
            	at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118) ~[na:1.6.0_20]
            	at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:203) ~[na:1.6.0_20]
            	at javax.naming.InitialContext.lookup(InitialContext.java:409) ~[na:1.6.0_20]
            	at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1902) ~[na:1.6.0_20]
            	at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1871) ~[na:1.6.0_20]
            	at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:276) ~[na:1.6.0_20]
            	... 6 common frames omitted
            Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
            	java.net.SocketTimeoutException: Read timed out
            	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:304) ~[na:1.6.0_20]
            	at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202) ~[na:1.6.0_20]
            	at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:340) ~[na:1.6.0_20]
            	at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) ~[na:1.6.0_20]
            	at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:114) ~[na:1.6.0_20]
            	... 11 common frames omitted
            Caused by: java.net.SocketTimeoutException: Read timed out
            	at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.6.0_20]
            	at java.net.SocketInputStream.read(SocketInputStream.java:146) ~[na:1.6.0_20]
            	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) ~[na:1.6.0_20]
            	at java.io.BufferedInputStream.read(BufferedInputStream.java:254) ~[na:1.6.0_20]
            	at java.io.DataInputStream.readByte(DataInputStream.java:265) ~[na:1.6.0_20]
            	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:246) ~[na:1.6.0_20]
            	... 15 common frames omitted
            2012-01-18 16:13:11.306 [pool-1-thread-5] DEBUG c.z.gateway.BinaryProtocolSpeaker - sending the following data in response: { "response" : "failed", "error" : "java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: \n\tjava.net.SocketTimeoutException: Read timed out]" }
            
            2012-01-18 16:13:11.306 [pool-1-thread-5] DEBUG com.zabbix.gateway.SocketProcessor - finished processing incoming connection
            Can you please give me a hint how to correct it?
            Last edited by dmltn84; 18-01-2012, 16:17.

            Comment

            • ev0ldave
              Junior Member
              • Dec 2011
              • 5

              #7
              verify connection to jmx console

              java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
              java.net.SocketTimeoutException: Read timed out
              Have you verified a connection to the jmx console?
              I noticed you enabled the jmxremote, but you also need to set the port number

              com.sun.management.jmxremote.port=portNum

              install the JDK and use the jconsole to connect to the client. 10.10.10.10 8083
              On a side note, isn't 8083 a default web connector port in jboss? by default jboss only allows jmx monitoring through the web-console. you must set the port to allow remote
              Last edited by ev0ldave; 18-01-2012, 18:01.

              Comment

              • dmltn84
                Junior Member
                • Jan 2012
                • 11

                #8
                connected but no jmx values are fetched

                Thanks for the hint.

                I have added following options to JAVA_OPTS:

                Code:
                -Dcom.sun.management.jmxremote 
                -Dcom.sun.management.jmxremote.port=8084 
                -Dcom.sun.management.jmxremote.authenticate=false 
                -Dcom.sun.management.jmxremote.ssl=false
                and changed respective configuration in GUI.

                Now it seems like connection is established, but values for some reason are not extracted from jmx console:

                Code:
                2012-01-19 14:31:56.006 [pool-1-thread-1] DEBUG c.z.gateway.BinaryProtocolSpeaker - received the following data in request: {
                	"request":"java gateway jmx",
                	"conn":"10.10.10.10",
                	"port":8084,
                	"keys":["jmx[java.lang:type=MemoryPool,name=Tenured Gen][Usage.used]"]}
                2012-01-19 14:31:56.043 [pool-1-thread-1] DEBUG com.zabbix.gateway.SocketProcessor - dispatched request to class com.zabbix.gateway.JMXItemChecker
                2012-01-19 14:31:56.043 [pool-1-thread-1] DEBUG com.zabbix.gateway.JMXItemChecker - connecting to JMX agent at service:jmx:rmi:///jndi/rmi://10.10.10.10:8084/jmxrmi
                2012-01-19 14:31:56.428 [pool-1-thread-1] DEBUG com.zabbix.gateway.ItemChecker - getting value for item 'jmx[java.lang:type=MemoryPool,name=Tenured Gen][Usage.used]'
                2012-01-19 14:31:56.463 [pool-1-thread-1] DEBUG com.zabbix.gateway.ItemChecker - caught exception for item 'jmx[java.lang:type=MemoryPool,name=Tenured Gen][Usage.used]'
                javax.management.InstanceNotFoundException: java.lang:type=MemoryPool
                ...
                2012-01-19 14:31:56.470 [pool-1-thread-1] DEBUG c.z.gateway.BinaryProtocolSpeaker - sending the following data in response: {
                  "data": [{"error": "java.lang:type=MemoryPool"}],
                  "response": "success"
                }
                There is also an error looking like the Java template is incomplete.

                Code:
                2012-01-19 14:32:06.573 [pool-1-thread-2] DEBUG com.zabbix.gateway.ItemChecker - caught exception for item 'jmx[java.lang:type=Compilation][TotalCompilationTime]'
                com.zabbix.gateway.ZabbixException: required key format: jmx[<object name>,<attribute name>]
                	at com.zabbix.gateway.JMXItemChecker.getStringValue(JMXItemChecker.java:121) [zabbix-java-gateway-1.9.8.jar:na]
                	at com.zabbix.gateway.ItemChecker.getJSONValue(ItemChecker.java:88) ~[zabbix-java-gateway-1.9.8.jar:na]
                	at com.zabbix.gateway.JMXItemChecker.getValues(JMXItemChecker.java:96) [zabbix-java-gateway-1.9.8.jar:na]
                	at com.zabbix.gateway.SocketProcessor.run(SocketProcessor.java:63) [zabbix-java-gateway-1.9.8.jar:na]
                	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.6.0_20]
                	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.6.0_20]
                	at java.lang.Thread.run(Thread.java:636) [na:1.6.0_20]

                How can I proceed now? Is there any specific template for java gateway which is not included in the default zabbix installation?

                ===
                Edit:

                Jconsole actually collects statistics, so problem is most likely on zabbix side, see attachment
                Attached Files
                Last edited by dmltn84; 19-01-2012, 15:18.

                Comment

                • ev0ldave
                  Junior Member
                  • Dec 2011
                  • 5

                  #9
                  wrong key format?

                  According to the log, the item does not exist, through jconsole verify that the mbean is correct in the classes you are reading. heap memory is a standard java usage and the below should work for you assuming we are using the latest versions. Also make sure you are using the correct key format.

                  What version of zabbix are you running? i am using 1.9.8 and the format has changed from the older versions

                  jmx["java.lang:type=Memory","HeapMemoryUsage.used"]

                  that is the format i must use (entire key is in a single set of brackets)

                  On a side note, even though the format was updated, some of the templates are still using the older version. the format kicked out in your log is correct

                  Comment

                  • dmltn84
                    Junior Member
                    • Jan 2012
                    • 11

                    #10
                    works

                    Thanks, heap memory records are now collected:

                    Code:
                    2012-01-20 10:22:10.467 [pool-1-thread-2] DEBUG com.zabbix.gateway.ItemChecker - received value '230267336' for item 'jmx["java.lang:type=Memory","HeapMemoryUsage.used"]'
                    2012-01-20 10:22:10.468 [pool-1-thread-2] DEBUG c.z.gateway.BinaryProtocolSpeaker - sending the following data in response: {
                      "data": [{"value": "230267336"}],
                      "response": "success"
                    It looks like the problem is in the Java Template provided with default zabbix installation (I am using the latest beta 1.9.8).

                    In the default Java Template items have type Zabbix Agent while the one that works is JMX Agent.

                    The format provided with the template is:

                    Code:
                    jmx[java.lang:type=Memory,HeapMemoryUsage.used]
                    while the format provided by you (the one that works) is:

                    Code:
                    jmx["java.lang:type=Memory","HeapMemoryUsage.used"]
                    So thanks again, now I know that the format of all items in Java Template should be corrected, at least in 1.9.8

                    Comment

                    • ev0ldave
                      Junior Member
                      • Dec 2011
                      • 5

                      #11
                      Making jmx method calls

                      If you are ever interested. there is a spiffy command line tool you can use to make JMX method calls through the normal zabbix agent.

                      The command line tool: you specify the hostort TheMbean theMethod. if no login required just put a hyphon before the hostname as below. Create your item as type log and just call the name in the agent.conf in your key. In my case pieJMX.reset. Of course this could all be setup in a script on the agent box to accept variables in order to have one item to call any mbean method you pass from the server.

                      tool: cmdline-jmxclient-0.10.3.jar
                      added line to zabbix_agent.conf: UserParameter=pieJMX.reset,java -jar c:\zabbix\cmdline-jmxclient-0.10.3.jar - 127.0.0.1:4930 com.pointserve.preprocessor.camel:context=prodtnt-pie/camel,type=routes,name=\"danlaw.file.processing.pr odtntgpsd\" reset
                      Last edited by ev0ldave; 20-01-2012, 17:33.

                      Comment

                      • dmltn84
                        Junior Member
                        • Jan 2012
                        • 11

                        #12
                        Thanks

                        It looks like a nice tool, though not actively maintained

                        I will keep it in mind

                        Comment

                        • dimir
                          Zabbix developer
                          • Apr 2011
                          • 1080

                          #13
                          CompositeData support was added in

                          pre-2.0.4 r30620 and pre-2.1.0 r30621.

                          Comment

                          Working...