Ad Widget

Collapse

Tomcat and JMX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • minimicro
    Junior Member
    • Sep 2024
    • 13

    #1

    Tomcat and JMX

    I'm trying to make a JMX connection. JMX is enabled on the client, if I telnet to the JMX port from Zabbix server, I have a connection.
    By using another machine with jConsole, it works.
    On the other hand in Zabbix, it remains in unknown status.

    Do you have an idea ?
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Are you running the Zabbix Java Gateway somewhere? That functions as a type of "proxy". The Zabbix server needs to be able to communicate with the Zabbix Java Gateway, and the gateway needs to be able to communicate with your JMX client.

    Comment

    • minimicro
      Junior Member
      • Sep 2024
      • 13

      #3
      No Zabbix Java Gatemay, just have Zabbix server run on virtual machine and Java JMX on another Virual Machine.

      When i run jConsole on another Virtual machine, i'ts working very well.

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        You have to run zabbix java gateway to get data from JMX endpoints... https://www.zabbix.com/documentation.../concepts/java

        Comment

        • minimicro
          Junior Member
          • Sep 2024
          • 13

          #5
          I run java gateway on server or on client ?

          What IP do I put in the configuration file ? I put client IP.

          I always have
          Code:
          ipclient:12345 Inconnu
          on JMX for the client
          Last edited by minimicro; 12-10-2024, 10:22.

          Comment

          • tim.mooney
            Senior Member
            • Dec 2012
            • 1427

            #6
            Cyber provided the link to the documentation for setting up the gateway.

            In my environment, I have the Zabbix Java Gateway running on our Zabbix server, but in your environment you might want to put it on the client or possibly even on a different system that is not the Zabbix server or the client. As long as communication is allowed (firewall exceptions, if there are firewalls between any of the components) between Zabbix server and the Zabbix Java Gateway and also between Zabbix Java Gateway and the JMX port on the client, you can put the gateway software anywhere.

            Just keep in mind the limitations that the documentation explains: you can only have one Java Gateway per Zabbix server or per Zabbix proxy.

            Comment

            • minimicro
              Junior Member
              • Sep 2024
              • 13

              #7
              I installed Java Gateway on my client, it works but doesn't capture anything ...

              Code:
              2024-10-14 08:42:01.697 [main] INFO  com.zabbix.gateway.JavaGateway - Zabbix Java Gateway 7.0.4 (revision f383737f108) has started
              2024-10-14 08:42:01.718 [main] INFO  com.zabbix.gateway.JavaGateway - listening on /51.xxx:10052
              51.xxx it's the localhost.

              Comment

              • cyber
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2006
                • 4807

                #8
                Did you add java gw config to your proxy/server configuration, so it now knows how to turn to your GW? Did you configure hosts jmx interface in Zabbix, did you add jmx items to be checked ?

                Comment

                • minimicro
                  Junior Member
                  • Sep 2024
                  • 13

                  #9
                  I add GW config in zabbix_server.conf.
                  I configure host jmx interface for the client but stay in gray.

                  Another question, in file zabbix_java_gateway.conf i have LISTEN_IP (i put 127.0.0.1) and LISTEN_PORT (i put 10052), and

                  Code:
                  # uncomment to enable remote monitoring of the standard JMX objects on the Zabbix Java Gateway itself
                  JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345
                          -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
                          -Dcom.sun.management.jmxremote.registry.ssl=false"
                  I uncomment this but what is port 12345 used for ?

                  Comment

                  Working...