Reputation: 326
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 & 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.
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 ? What is the best way to do it ? Thanks !!
Upvotes: 0
Views: 753
Reputation: 1
For servers with multiple jmx roles, I applied the following method:
I created 4 different JMX interfaces for 4 different Apache Tomcat installations and 4 different published ports on the same host.
I copied the Apache Tomcat by JMX template with a different name for each Tomcat.
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. However, this did not ensure that the newly created templates would select the correct JMX interface.
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. In this way, I could use 4 different Tomcat templates on a single host.
Upvotes: 0
Reputation: 45
Actually you cannot have more than one JMX on the same host. Unfortunatelly you have to create a new host per each JMX that you want to monitor. I have the same issue right now, I have 2 JVM instances running on the same machine and I was trying to monitor both on the same host but is not possible. I'm not quite sure why you can add multiples JMX interfaces if you cannot monitor multiples JXM (at least using Templates)
Upvotes: 1