Gal Shaboodi
Gal Shaboodi

Reputation: 764

Find out Kafka version remotely

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.

Upvotes: 11

Views: 12252

Answers (1)

fhussonnois
fhussonnois

Reputation: 1727

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.

Upvotes: 3

Related Questions