Ad Widget

Collapse

Trying to monitor tomcat

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bisana
    Member
    • Jul 2005
    • 87

    #1

    Trying to monitor tomcat

    Hi All,
    I am trying out monitoring Tomcat application server, using JMX
    I am referring the docs
    https://www.zabbix.com/documentation...x_monitoring?s[]=jmx
    did changes in my Java environment.
    Restarted the tomcat server from the host, gave the correct info in JMX definitions for the host entry
    after repeated try also I am not able to connect
    I know somewhere I have gone wrong. Like to cross check
    Like to check with the latest/simple how to do for tomcat monitoring
    Request for url or link for any sample setups which have been done
    Thanks
    Joseph John
    using zabbix 3.2.3 on ubuntu 16.04 LTS
  • bisana
    Member
    • Jul 2005
    • 87

    #2
    Following steps I have done

    installed zabbix-java-gateway on the zabbix server

    and on the host which I am monitoring, in the tomcat directory/bin
    i created a "setenv.sh"
    with contents
    <code>
    "-Dcom.sun.management.jmxremote\
    -Dcom.sun.management.jmxremote.port=12345\
    -Dcom.sun.management.jmxremote.authenticate=false\
    -Dcom.sun.management.jmxremote.ssl=false"
    </code>

    But when I run tomcat, I am getting the message
    <code>setenv.sh: -Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.port=12345-Dcom.sun.management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.ssl=false: not found

    </code>

    Advice and comments requested
    thanks
    Joseph John

    Comment

    • bisana
      Member
      • Jul 2005
      • 87

      #3
      my setenv file is

      in my host machine, this is what I have given in the "setenv.sh" file

      export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
      export CATALINA_HOME=/home/saji/apache-tomcat-9.0.0.M17/
      export CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

      But in the zabbix server, I am not getting any information from the clients at all
      I am trying to update the progress and see if I can get some advice
      thanks
      Joseph John

      Comment

      • asmoore82
        Junior Member
        • Aug 2024
        • 1

        #4
        Just a minor note for google search results.

        General Tomcat issue: I'm not sure but I don't think you should export out of setenv.sh

        the setenv.sh and catalina.sh mechanisms need to take in all the vars and they decide what to export to child processes.
        CATALINA_OPTS are not exported because they are only used to launch java. Passing extra exports could expose information that shouldn't be exposed.

        ~Adam

        Comment

        Working...