Ad Widget

Collapse

The problem with JMX monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • threesir
    Junior Member
    • Jun 2014
    • 2

    #1

    The problem with JMX monitoring

    Hi, All

    I got a problem with JMX monitoring.

    I have a zabbix server A with two clients B and C. Now i can successfully monitor the system status with B and C from my server A. However once i active the Java Gateway, i only can see there is no issue with the connection from client server to Zabbix server (The host status shows green light both for zabbix service and JMX), but i am not able to catch the real JMX data from B and C. Can anyone offer some ideas?

    Also i would like to know, does the client server also need to state the Java Gateway address (But the client server only have the agent service, where did i to add the Java gateway address)? Or i can listen the address for B and C from zabbix server? (Currently the listen IP is 0.0.0.0, the Java Gateway wont start if i change the listen IP to address of B or C)


    Thanks.
  • coreychristian
    Senior Member
    Zabbix Certified Specialist
    • Jun 2012
    • 159

    #2
    Not 100% sure I am reading your issue correctly, so if I am not I apologize.

    It sounds like you are trying to setup multiple java gateways, which isn't supported (without multiple proxies anyway).

    Essentially for your setup you should have the following.

    Zabbix Server
    Zabbix Java Gateway

    Client Server A
    Client Server B

    The same Java Gateway should be used to communicate with both client servers. When you configure a JMX Interface the zabbix server should automatically use the zabbix_server.conf's java gateway for that client server A and B.

    The listen address for the java gateway though should be the IP address that it's listening to on the server where the gateway is installed, the JMX Interfaces on the client systems in the host configuration should be the IP address of the system you are trying to connect to.

    Comment

    • LenR
      Senior Member
      • Sep 2009
      • 1005

      #3
      There are things to do on the Java side of the app server. I don't know java, the app owners followed a cookbook, but if the port you're going to monitor (10052) on the java server isn't listening and properly configured, there is more to do.

      Comment

      • threesir
        Junior Member
        • Jun 2014
        • 2

        #4
        Originally posted by coreychristian
        Not 100% sure I am reading your issue correctly, so if I am not I apologize.

        Zabbix Server
        Zabbix Java Gateway

        Client Server A
        Client Server B

        Hi coreychristian,

        Thank you very much for your help. I would like to put the zabbix server and zabbix gateway on a single server, to monitor my app servers B and C. Now i have no problem to retrieve the data for the system and memory usage status from my app server, but only the Java status failed to load it. however, i verified the connection thru telnet port number, it is ok. And also from the host configuration page, the JMX is turn to green light. I would like to know that if i need add the java gateway address to my app server as well, and where should i to put it since i only installed the agent service on app server, there is no server.conf file there, only the agentd.conf.

        Here are my sample,

        server.conf on zabbix server
        JavaGateway=192.168.80.120
        JavaGatewayPort=10052
        StartJavaPollers=5
        PidFile=/var/run/zabbix/zabbix_server.pid


        Java gateway on zabbix server
        LISTEN_IP="0.0.0.0"
        LISTEN_PORT=10052
        PID_FILE="/var/run/zabbix/zabbix_java.pid"
        START_POLLERS=5

        JMX setting on app server
        -Dcom.sun.management.jmxremote.port=10052 -Dcom.sun.management.jmxremote.ssl=false
        -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.local.only=false
        -Dcom.sun.management.jmxremote.password.file=$HOME/apps/tomcat/conf/jmxremote.password
        -Dcom.sun.management.jmxremote.access.file=$HOME/apps/tomcat/conf/jmxremote.access

        Agentd.conf on app server
        Server=192.168.80.120
        ServerActive=192.168.80.120
        Hostname=192.168.80.188

        Do i miss anything? Please advice. thank you very much!

        Comment

        • coreychristian
          Senior Member
          Zabbix Certified Specialist
          • Jun 2012
          • 159

          #5
          Based on what I am seeing, everything looks like it should be fine. Are there any messages in the java gateway or zabbix server log regarding the items you created? Also to note, I let our app team handle the java side, so I am not very familiar with it.

          Here is an example item key which I believe should work for most jave apps.

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

          Also while it's pretty obvious I assume your user/pass sync up between the java server and the items you are creating.

          Comment

          Working...