Ad Widget

Collapse

JMX - Cannot open received JSON

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hartgreg
    Junior Member
    • Jan 2020
    • 5

    #1

    JMX - Cannot open received JSON

    I have a VM with a perfect running zabbix-agent. Now i try to implement also JMX-Monitoring. I installed the zabbix_java_gateway on this VM and started:

    setenv.sh:
    JAVA_OPTS="-Dcom.sun.management.jmxremote ${JAVA_OPTS}"
    JAVA_OPTS="-Dcom.sun.management.jmxremote.port=12345 ${JAVA_OPTS}"
    JAVA_OPTS="-Dcom.sun.management.jmxremote.authenticate=false ${JAVA_OPTS}"
    JAVA_OPTS="-Dcom.sun.management.jmxremote.ssl=false ${JAVA_OPTS}"
    export JAVA_OPTS

    Logfile:
    2020-10-07 14:46:07.964 [main] INFO com.zabbix.gateway.JavaGateway - Zabbix Java Gateway 4.4.10 (revision 4db30afc70) has started
    2020-10-07 14:46:07.969 [main] DEBUG c.z.gateway.ConfigurationManager - starting to parse configuration parameters
    2020-10-07 14:46:07.973 [main] DEBUG c.z.gateway.ConfigurationManager - found pidFile configuration parameter with value '/run/zabbix/zabbix_java_gateway.pid'
    2020-10-07 14:46:07.974 [main] DEBUG c.z.gateway.ConfigurationManager - received pidFile configuration parameter, daemonizing
    2020-10-07 14:46:07.974 [main] DEBUG c.z.gateway.ConfigurationManager - finished parsing configuration parameters
    2020-10-07 14:46:07.980 [main] INFO com.zabbix.gateway.JavaGateway - listening on 0.0.0.0/0.0.0.0:10052
    2020-10-07 14:46:07.982 [main] DEBUG com.zabbix.gateway.JavaGateway - created a thread pool of 5 pollers

    i have a zabbix_proxy between VM and zabbix_server. I configured this lines in the zabbix_proxy.conf:

    JavaGateway=192.168.1.110
    JavaGatewayPort=12345
    StartJavaPollers=5

    zabbix_proxy Logfile:

    23924:20201007:151645.660 JMX agent item "jmx["java.lang:type=Memory",HeapMemoryUsage.commit ted]" on host "ttx_test_jira" failed: first network error, wait for 15 seconds
    23936:20201007:151700.667 JMX agent item "jmx["java.lang:type=Memory",HeapMemoryUsage.commit ted]" on host "ttx_test_jira" failed: another network error, wait for 15 seconds
    23936:20201007:151715.669 JMX agent item "jmx["java.lang:type=Memory",HeapMemoryUsage.used]" on host "ttx_test_jira" failed: another network error, wait for 15 seconds
    23936:20201007:151730.671 temporarily disabling JMX agent checks on host "ttx_test_jira": host unavailable

    host unavailable but the zabbix_agent on ttx_test_jira is working perfect

    on zabbix_server i configured additional JMX Interface with the same IP and Port 12345. No encryption.


    Click image for larger version

Name:	2020-10-07 16_01_11-Configuration of hosts.png
Views:	1082
Size:	56.1 KB
ID:	410403


    Can somebody help, please
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    It seems to me that you have not figured out how this system works. In particular, in the proxy configuration file, you must specify the connection parameters to jmxgate (port 10052), not to the application (port 12345).
    I also recommend checking whether port 10052 is listened to after the start of jmx gate and 12345 after the start of the java application.
    For testing connecting to jmx of application you can use JConsole or Jmxterm.
    Last edited by Hamardaban; 07-10-2020, 19:28.

    Comment

    • hartgreg
      Junior Member
      • Jan 2020
      • 5

      #3
      Thanks a lot Hamardaban. Now it works!

      Comment

      Working...