M
M
Monkz2019-01-28 18:07:35
Monitoring
Monkz, 2019-01-28 18:07:35

How to configure Zabbix to monitor Tomcat?

Good afternoon!
Please help with setting up tomcat monitoring on zabbix.
Given:
Zabbix-server ip xxxx
server with tomcat ip yyyy
What I did:
zabbix-java-gateway is installed on the zabbix server (I didn’t change anything in its config file)
in the zabbix.conf config - javagateway=127.0.0.1 javagatewayport=10033
On the server where tomcat (ip - yyyy) added CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7777 -Dcom.sun.management.jmxremote.ssl=false -Djava to catalina.sh .rmi.server.hostname=yyyy"
In the zabbix web-face I add a server where jmx interface yyyy port 7777 and JMX does not turn green.
Where could be the problem??

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
wirehead, 2019-05-21
@wirehead

  1. Create remote.users and remote.acl files, for example, in the /conf folder
  2. remote.user contains the user password, in the format: usename strontpassword
  3. remote.acl contains JMX permissions e.g. username readwrite
  4. in catalina.sh write:
    CATALINA_OPTS="$CATALINA_OPTS \
    -Dcom.sun.management.jmxremote.password.file=/<path to tomcat>/conf/remote.users \
    -Dcom.sun.management.jmxremote.access.file =/<path to tomcat>/conf/remote.acl \
    -Dcom.sun.management.jmxremote \
    -Dcom.sun.management.jmxremote.port=7777 \
    -Dcom.sun.management.jmxremote.ssl=false \
    - djava.rmi.server.hostname=yyyy"
    Personally, without a user, JMX also did not rise for me. In Zabbix, when creating items, specify the login and password for JMX. Look at the templates here: https://www.zabbix.com/integrations/tomcat
    In general, if something does not take off, you should first look at the zabbix-server and zabbix-java-gateway logs :)

V
VoidVolker, 2019-01-28
@VoidVolker

If I remember correctly, there is nothing super complicated there - a template is set, configured and everything works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question