Ad Widget

Collapse

JMX monitoring with Zabbix 2.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arunssasidhar
    Junior Member
    • May 2012
    • 6

    #1

    JMX monitoring with Zabbix 2.0

    Hello,

    I am trying to implement JMX monitoring with Zabbix 2.0. I want to monitor my Jboss instance using Zabbix. I have done following things.

    1. I have compiled Zabbix server 2.0 with following arguments.
    ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --enable-java
    1.1 - Configured the JavaGateway=X.X.X.X & JavaGatewayPort=10052 in
    Zabbix_server.conf file
    1.2 - Started the Zabbix Server and Zabbix_java gateway in zabbix Server.

    2. I have compiled zabbix agent (In JBoss Server) with following arguments.
    ./configure --enable-agent

    3. I have configured JBoss to enable jmxremote connections (With authentication).

    4. I have added a host in zabbix GUI for this host. (As described here
    :http://www.zabbix.com/documentation/...jmx_monitoring)

    5. And Added a simple Item to Monitor. ( jmx["java.lang:type=Runtime",Uptime] )

    6. But in the Agent Log i am Getting
    Sending back [ZBX_NOTSUPPORTED] +JMX monitoring

    7. And in the Zabbix GUI, The JMX monitor Icon aganist the Host is red in colour and saying "java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectI".


    And Also The "Select" button against the Key field is disabled in my Item Window. Please find the attached screenshot.

    Is there any additional steps required for the JMX monitor to work?

    EDIT : And I am seeing some error in /tmp/zabbix_java.log in Zabbix Server Please see the attached Error.txt file.

    Any help would highly appreciated.
    Please help me in fixing this issue.

    Thanks,
    Arun S
    Attached Files
    Last edited by arunssasidhar; 29-05-2012, 09:22. Reason: Added Error Log
  • lgc78
    Member
    • Aug 2010
    • 35

    #2
    I'm experiencing the exact same problem (Zabbix 2.0) - I had this working successfully with one of the betas. (monitoring tomcat)

    Has anyone got this working correctly?

    Comment

    • lgc78
      Member
      • Aug 2010
      • 35

      #3
      Update:

      I deleted my host running tomcat and re-added it. This resolved my issue (when i first setup JMX monitoring i had mis-configured jmxremote settings). Zabbix is not forgiving in this scenario. You better get it right the first time

      I also have a new issue to report. When i apply the JMX_Generic and JMX_Tomcat templates that came default with zabbix 2.0 it crashes the zabbix server service. After i restart the service again it is ok. I can reproduce the problem if i re-enable the unsupported JMX items again.

      Note: the select button is still greyed out in the JMX templates

      arunssasidhar, let me know if deleting/re-adding resolves your issue too.

      Comment

      • sakaanil
        Junior Member
        • Nov 2011
        • 2

        #4
        Tomcat JVM monitoring using JMX

        I am having the same problem:

        i have enabled the tomcat to listen on Prt 8888 for JMX queries.

        i can fireup Jconsole and able to see the java metrics[ to verify i did this]

        but when i config the zabbix , i am not able to gether any stats.,

        i have enabled it by editing my catalina.sh:

        -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8888 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

        I am seeing the same issue what arun has listed.

        i tried deleting and reconfiguring the host.

        Comment

        • ufocek
          Senior Member
          • Aug 2006
          • 161

          #5
          Hi,

          I have the same problem when I try monitoring a glassfish 2.x server.
          The button select on key is unavailable...

          Comment

          • lgc78
            Member
            • Aug 2010
            • 35

            #6
            sakaanil try this (replace <HOSTNAME> with the hostname of your tomcat server)


            -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8888 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=<HOSTNAME>

            Also, make sure your JMX interface is configured to connect to DNS (alternatively you can put the IP address of your tomcat server).

            Hope this helps.
            Last edited by lgc78; 05-06-2012, 01:24.

            Comment

            • zette
              Junior Member
              • Jul 2012
              • 2

              #7
              JMX failed to retrieve RMIServer

              Hi,
              I'm trying to monitor my Apache ESB running on top of Tomcat server.
              I've managed to build zabbix 2.0.1 with zabbix_java enabled, and that part works just fine.
              But after adding (I've tried several times already) I can not get any values from remote JMX (that is enabled, and I can access it via jconsole).

              In log I get :
              gateway.BinaryProtocolSpeaker - sending the following data in response: { "response" : "failed", "error" : "java.io.IOException: Failed to retriev
              e RMIServer stub: javax.naming.NameNotFoundException: jmxrmi" }

              I've found that zabbix sends its queries to address:
              service:jmx:rmi:///jndi/rmi://10.51.11.51:1099/jmxrmi
              and that causes problems since my application runs at:
              service:jmx:rmi:///jndi/rmi://10.51.11.51:1099/karaf-root

              I've been searching for a way of changing jmxrmi to another name without success. Could someone give me a hint where/how that can be done?

              BR

              Comment

              • zette
                Junior Member
                • Jul 2012
                • 2

                #8
                JMX failed to retrieve RMIServer

                I've investigated it further.
                The problem is, as I thought, with jmx service url that is hardcoded in zabbix_java JMXItemChecker.java with '/jmxrmi' suffix.

                According to http://fusesource.com/docs/esb/4.4.1...onfig-JMX.html
                I need to have a way to define this suffix in zabbix, since it is possible I'll have more instances of my application working on one port, and distinguished only by this suffix name.

                Comment

                • icodeiexist
                  Junior Member
                  • Jan 2015
                  • 1

                  #9
                  This hasn't been fixed, any workaround

                  Hello, it's been a long time since this was reported, I'm using 2.4, is there any work around to this?
                  Thank you very much.

                  Comment

                  Working...