Ad Widget

Collapse

Zabbix Configuration for Monitoring Multiple Tomcat JVM on Single Host via JMX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tejas
    Junior Member
    • Feb 2020
    • 1

    #1

    Zabbix Configuration for Monitoring Multiple Tomcat JVM on Single Host via JMX

    I have multiple instance of Tomcat on a single host running on different port. I have enabled JMX on each tomcat instance with 2 different port (9999 and 9998).

    -Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.port=9999
    -Dcom.sun.management.jmxremote.rmi.port=9999
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false
    -Djava.rmi.server.hostname=10.1.2.3

    and

    -Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.port=9998
    -Dcom.sun.management.jmxremote.rmi.port=9998
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false
    -Djava.rmi.server.hostname=10.1.2.3

    I would like to monitor both jvm via zabbix. I'm using a Generic JVM template.
    I'm able to add a single JMX Interface via Configuration> Host> Create New Host > JMX Interface : 10.1.2.3:9999.
    I can view the Metrics/Graphs on Zabbix UI.

    Is it possible to another JMX entry (10.1.2.3:9998) under the same host ? Or do i need to create another host entry for port 9998 ?
    we have 15 hosts with each having 10 tomcat instances, hence would like to know what is the best way to do it ? Do i need to create 150 Host entries in Zabbix?
    Note: i'm using a older version of Zabbix (2.0.4) on Ubuntu 14. Tomcat version 9.0 running on Windows Server.Thanks !!
  • Gloomeye
    Junior Member
    • Aug 2024
    • 4

    #2
    For servers with multiple jmx roles, I applied the following method:

    1) I created 4 different JMX interfaces for 4 different Apache Tomcat installations and 4 different published ports on the same host.Click image for larger version

Name:	dataurl661405.png
Views:	141
Size:	58.4 KB
ID:	491850
    2) I copied the Apache Tomcat by JMX template with a different name for each Tomcat.

    3) I defined the description as Port2/Port3/Port4 in the key fields using jmx for each template. (For example: jmx["Catalina:type=Server",serverInfo,Port4]) I did this in all Item, Discovery Rules, Item Prototypes, and Graph Prototypes Name fields.Click image for larger version

Name:	dataurl661409.png
Views:	144
Size:	46.3 KB
ID:	491852
    However, this did not ensure that the newly created templates would select the correct JMX interface.

    4) To select the correct JMX interface, I selected the correct JMX interface from the host interface combo box on the host. I did this in all Item, Discovery Rules, and Item Prototypes key fields.Click image for larger version

Name:	dataurl661411.png
Views:	146
Size:	48.8 KB
ID:	491851
    In this way, I could use 4 different Tomcat templates on a single host.

    Click image for larger version

Name:	dataurl661412.png
Views:	211
Size:	13.1 KB
ID:	491849

    Comment

    Working...