JMX Monitoring with more than one system

Josman
New Contributor II

We have been monitoring our Jamf Pro master node with openNMS for the longest time. Recently we switch the monitoring to Jconsole. The switch of course broke openNMS, in an attempt to have both systems monitor the master, we came up with the following setenv.sh file below. Still wont work in openNMS I can see a few reasons why. If anyone has done that successfully It would be appreciated if they share their method

#!/bin/sh
# Place any and all customizations to your Tomcat instance here.
# Examples:
#
#
# This file will be backed up and restored on upgrades.

export CATALINA_OPTS="-Xms1024M -Xmx9216M"


###### Add in these lines ######
# Turn on remote JMX over port 3333.  Port number can be changed.
export CATALINA_OPTS="$CATALINA_OPTS -Djava.awt.headless=true -Dcom.sun.management.jmxremote.port=3333"
# Do not require SSL.  Requiring it is fine, but more configuration is needed to do so.
export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
# Require authentication to connect to JMX.
export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
# Dont Require JMX Monitoring on the Same computer 
export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.local.only=false"
# Turn on remote JMX
export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote=true"
# IP/hostname of the server that JMX is being enabled on.  This is the IP of the example web server we are working on.
export CATALINA_OPTS="$CATALINA_OPTS -Djava.rmi.server.hostname=10.50.50.50"
# Specify to use the password file for authentication.
export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.password.file=/etc/java-8-openjdk/management/jmxremote.password"

##### OpenNMS Lines #####
export JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
export JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER"
export JAVA_OPTS="$JAVA_OPTS -XX:-OmitStackTraceInFastThrow"
export JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
export JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9991 -Djava.net.preferIPv4Stack=true"
export JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=true"
export JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.password.file='/usr/local/jss/tomcat/bin/my.password.file'"
export JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.access.file='/usr/local/jss/tomcat/bin/my.access.file'"
export JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=10.50.50.50"
0 REPLIES 0