Ad Widget

Collapse

Check JVM status with JMX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jnunez47
    Junior Member
    • Dec 2015
    • 5

    #1

    Check JVM status with JMX

    Hi friends, I have a doubt with Zabbix and JMX monitoring because I need to monitoring a java application.

    I followed the instructions of this link: https://www.zabbix.com/documentation...jmx_monitoring

    I have Zabbix Server with Zabbix Java Gateway in a VPS and the java application in other server (VPS).

    To test, I created an iteam with the key: jmx["java.lang:type=Memory","HeapMemoryUsage.used"] but I don't see anything in the item's graph.

    When I try to test this item on client and I receive this response:
    ubuntu@wrapper-lab:/usr/bin$ zabbix_agent -t jmx["java.lang:type=Memory","HeapMemoryUsage.used"]
    jmx[java.lang:type=Memory,HeapMemoryUsage.used] [m|ZBX_NOTSUPPORTED]
    What am I doing wrong?
  • mander
    Junior Member
    • Apr 2016
    • 3

    #2
    You probably just have an error in the key.

    To get the full list of jmx keys for your jvm, try running JConsole while your java app is up. Put whatever strings you find there inside jmx["here"] and it ought to be good.

    Comment

    • jnunez47
      Junior Member
      • Dec 2015
      • 5

      #3
      I made a test with JConsole in my PC, and I can watch the monitor correctly, but zabbix agent doesn't found. I have linking "JMX Generic" template in my host.

      This is my command line to execute my java application:
      Code:
      java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=10052 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xms512M -Xmx1024M -d64 -jar jasolina.jar
      Code:
      zabbix_agent -t jmx["java.lang:type=Memory","HeapMemoryUsage.used"]
      jmx[java.lang:type=Memory,HeapMemoryUsage.used] [m|ZBX_NOTSUPPORTED]

      Comment

      Working...