Ad Widget

Collapse

Monitoring Java applications using JMX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rimelalami
    Junior Member
    • Aug 2017
    • 4

    #1

    Monitoring Java applications using JMX

    Hello everyone!
    I found problems to monitor tomcat installed in a centos7 server.
    I have zabbix-server installed in an ubuntu server and I want to monitor tomcat server installed in centos using JMX.
    I've installed java gateway in my zabbix-server machine, because there isn't enought documentation about this part, I don't know what to do next.
    Please if it works for anyone what are the steps that you followed.
    I work with zabbix for my internship; so I'm new at zabbix.
    Thank you
  • rv_overseer
    Junior Member
    • Jul 2014
    • 14

    #2
    Configuring Zabbix server

    Have you edited the Zabbix Server config file and added the JavaGateway details as in the documentation:
    https://www.zabbix.com/documentation...oncepts/java?s[]=java&s[]=gateway&s[]=configuration

    12.5.4 Configuring server for use with Java gateway

    Now that Java gateway is running, you have to tell Zabbix server where to find Zabbix Java gateway. This is done by specifying JavaGateway and JavaGatewayPort parameters in server configuration file. If the host on which JMX application is running is monitored by Zabbix proxy, then you specify the connection parameters in proxy configuration file instead.

    JavaGateway=192.168.3.14
    JavaGatewayPort=10052

    Comment

    • allexpetrov
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2017
      • 361

      #3
      Originally posted by rimelalami
      Hello everyone!
      I found problems to monitor tomcat installed in a centos7 server.
      I have zabbix-server installed in an ubuntu server and I want to monitor tomcat server installed in centos using JMX.
      I've installed java gateway in my zabbix-server machine, because there isn't enought documentation about this part, I don't know what to do next.
      Please if it works for anyone what are the steps that you followed.
      I work with zabbix for my internship; so I'm new at zabbix.
      Thank you
      Hi, rimelalami!

      You need to configure server to use Java Gateway:

      Open zabbix_server.config , and add few strings
      JavaGateway=127.0.0.1
      StartJavaPollers=5

      also don't forget to add few lines in tomcat.conf(/etc/tomcat/tomcat.conf) file:
      JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

      Regards,
      Alex

      Comment

      • rimelalami
        Junior Member
        • Aug 2017
        • 4

        #4
        Thank you Alex !
        I did what you said & I've also added the jmx template but it still doesn't work; I don't know where I went wrong or if I missed any configuration ! Do you have any idea

        Comment

        • allexpetrov
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • May 2017
          • 361

          #5
          Originally posted by rimelalami
          Thank you Alex !
          I did what you said & I've also added the jmx template but it still doesn't work; I don't know where I went wrong or if I missed any configuration ! Do you have any idea
          rimelalami,
          we can't help you without information from you.

          First of all, lets start with reading and pasting log files ( don't forget to wrap them in [CODE] tag) :

          1. Paste your server logs here. If server can't perform checks - it should be in log. You can open log file using tail -f /var/log/zabbix/zabbix_server.log

          2. Paste, as a screenshot, your host configuration (which you want to monitor).

          Lets start with those two points and then we will see what we can do next!

          P.S. -And please, don't start threadbombing - it looks disrespectful

          Comment

          Working...