Configuring JVM Monitoring for Linux in Apache Qpid Java Broker

To collect JVM-related metrics, the eG agent connects to the Apache Qpid Java Broker via JMX. By default, JMX support is not enabled on Apache Qpid Java Broker. However, to enable the eG agent to use JMX, the JVM tests that the eG agent runs should be configured with a JMX Remote Port - this is the port at which the JMX listens for requests from remote hosts. You need to determine the available JMX remote port to configure.

Determining the JMX Remote Port

JMX can be configured based on the availability of the port. For our assumption, the JMX is configured in port 16666. To enable JVM metrics for Apache Qpid Java Broker component, first we need to specify the binary file location(for example:installation location/bin/qpid-server file and then check whether/not the JMX remote arguments are enabled (see Figure 1).

Figure 1 : Determining the JMX Remote Arguments for Linux in Apache Qpid Java Broker

By default, the JMX parameters are added. If the JMX parameters are not added, then add the following lines after “QPID_RUN_LOG=2d” in qpid-server.sh file.

export JAVA=java \
JAVA_VM=-server \
JAVA_MEM="-Xmx512m -XX:MaxDirectMemorySize=1536m" \
JAVA_GC="-XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError" \
QPID_CLASSPATH="${QPID_LIBS}" \
QPID_RUN_LOG=2
QPID_OPTS="-Dcom.sun.management.jmxremote.port=16666
-Dcom.sun.management.jmxremote.ssl=false -
Dcom.sun.management.jmxremote.authenticate=false -
Djava.rmi.server.hostname=192.168.8.137"

Then restart the server with the command as

installation location/bin/qpid-server