Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find out Kafka version remotely

Tags:

apache-kafka

Is there a way to find out the Kafka version from outside the cluster? (maybe with telnet or another tool)

just for clarification, I don't have ssh neither to Kafka nor zookeeper.

like image 701
Gal Shaboodi Avatar asked Dec 04 '18 13:12

Gal Shaboodi


1 Answers

The easiest solution to retrieve the version of kafka Cluster is to used the JMX metrics exposed by each broker. Usually, JMX is activate on brokers for monitoring purpose.

The version can is exposed by ach broker through the metric name :

kafka.server:type=app-info,version=<([-.\w]+)>

For doing this, you can use jconsole or the JmxTool available in the Apache/Confluent Kafka distribution.

Here is an example :

$> ./bin/kafka-run-class kafka.tools.JmxTool --jmx-url service:jmx:rmi:///jndi/rmi://:9999/jmxrmi --object-name kafka.server:type=app-info --attributes version 

This will give you an ouput :

Trying to connect to JMX url: service:jmx:rmi:///jndi/rmi://:9999/jmxrmi.
"time","kafka.server:type=app-info:version"
1556186760721,2.1.0-cp1
1556186762728,2.1.0-cp1
1556186764727,2.1.0-cp1

Note, that you should configure the property --jmx-url with your own environment info.

like image 57
fhussonnois Avatar answered Nov 16 '22 17:11

fhussonnois