Configuring BTM Monitoring for Linux in Apache Kafka Message System

eG Enterprise's Java Business Transaction Monitor (BTM) tracks individual transactions to Apache Kafka Message System in real-time, captures the time taken by each transaction, traces the journey of each transaction and the path it takes, and accurately pinpoints where and why a transaction slowed down. To collect BTM-related metrics, the eG agent connects to the Apache Kafka Message System via BTM.

To enable BTM metrics for Apache Kafka Message System component, first we need to specify the path of the BTM jar file location and then add the below line to the KAFKA_JMX_OPTS parameter where this parameter exists in installation location/bin/ kafka-run-class.sh file

KAFKA_JMX_OPTS="-javaagent:<BTM jar location>”

For example, it should be

if [ -z "$KAFKA_JMX_OPTS" ]; then
KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-javaagent:/opt/eGurkha/lib/javaagent_btmkafka_9092/eg_btm.jar"
)

Then start the zookeeper first, by the adding the command as

installation location/bin/zookeeper-server-start.sh config/zookeeper.properties

Finally, start the Kafka server by the adding the command as

installation location/bin/kafka-server-start.sh config/server.properties