Ad Widget

Collapse

How to use JMX/tomcat User parameters in agent file.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sunnysthakur
    Junior Member
    • Jan 2013
    • 3

    #1

    How to use JMX/tomcat User parameters in agent file.

    Hello,

    We were using Nagios for Server Monitoring and now switching to Zabbix due to its good front end.

    I am facing a challenge to monitor Tomcat monitoring via zabbix now.

    Below are the steps i performed for tomcat monitoring.


    1. Added the below line in catalina.sh to enable jmx
    HTML Code:
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
    2. After above step i am able to view the output from tomcat server once i am executing the below command on Zabbix server.
    HTML Code:
    [root@monitor ~]# java -jar cmdline-jmxclient-0.10.3.jar '-':'-' [B]10.0.0.234:9001 java.lang:type=OperatingSystem ProcessCpuTime
    01/19/2013 13:34:58 +0530 org.archive.jmx.Client ProcessCpuTime: 10040000000[/B]
    3. Now i setup the above command in agent file of tomcat server
    HTML Code:
    UserParameter=jvm.maxthreads, java -jar /root/cmdline-jmxclient-0.10.3.jar '-':'-' 10.0.0.234:9001 java.lang:type=Threading PeakThreadCount
    HTML Code:
    UserParameter=jvm.maxthreads, java -jar /root/cmdline-jmxclient-0.10.3.jar '-':'-' 10.0.0.234:9001 java.lang:type=OperatingSystem ProcessCpuTime
    4. I also attached the tomcat template on added tomcat server in zabbix front end.

    After performing all the above steps i am not able to view the tomcat data on zabbix server.

    Please help me on this if i am missing something in above setup.
  • heaje
    Senior Member
    Zabbix Certified Specialist
    • Sep 2009
    • 325

    #2
    Did you restart the agent daemon after adding your new user parameter? That's a required step when adding custom checks.

    Also, what version of Zabbix are you using? The 2.0.x series supports JMX monitoring out-of-the-box, so there isn't a need to set up custom Agent checks for JMX stuff (assuming the Zabbix server can hit the JMX interface). To get that all working, just do the following steps:

    1. Set up the Zabbix Java Gateway by following the instructions in the Zabbix documentation.
    2. Follow the instructions at the Zabbix JMX documentation to get your JMX monitoring working.

    Comment

    • sunnysthakur
      Junior Member
      • Jan 2013
      • 3

      #3
      Hello heaje,

      I am using Zabbix Server 1.8.2 and agent version 1.8.2 and setup server-agent for active checks.

      After added these jmx user parameters i restarted the server but didn't reflect the changes on server.

      You means to say in version 2.0 supports tomcat/jmx monitoring without adding these parameters to agent ?

      And 2.0 is supporting on Red hat/CentOS 6 version and i am using CentoS 5.8

      And one more thing i am not able to alter the output generated by

      HTML Code:
      java -jar cmdline-jmxclient-0.10.3.jar '-':'-' 10.0.0.234:9001 java.lang:type=OperatingSystem ProcessCpuTime
      HTML Code:
      01/21/2013 07:24:39 +0530 org.archive.jmx.Client ProcessCpuTime: 98160000000
      I am not able to see the result of tomcat on zabbix dashboard

      Please help on this

      Comment

      Working...