Monitoring Kafka Clusters using Ganglia is a matter of a few steps. This blog post lists down those steps with an assumption that you have your Kafka Cluster ready.
Step-I: Setup JMXTrans on all the machines of the Kafka cluster as done on the Storm cluster in the previous post.
Step-II: In the kafka setup, edit “kafka-run-class.sh” script file by adding the following line to it:
KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false "
Step-III: Also, edit the “kafka-server-start.sh” script file present in the kafka setup to set the JMX port to 9999 by adding the following line:
export JMX_PORT=${JMX_PORT:-9999}
Now, on all the nodes of the cluster on which you have performed the above steps, you can run the following json file after which it should start reporting its metrics to the Ganglia server.
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.port=33333
Read full article from Kafka Monitoring using JMX-JMXTrans-Ganglia
No comments:
Post a Comment