Given a broker host/ip is there a way to interrogate it to learn the broker ID other than by querying ZK? I'm trying to map the IP to the broker ID for monitoring. ZK is authenticated and I don't have access. I'm preferably looking for a value in JMX.
Asked
Active
Viewed 437 times
2 Answers
0
The JMX values contains the kafka hostname: advertised.host.name or java.net.InetAddress.getCanonicalHostName().
Have a look here http://kafka.apache.org/090/documentation.html#brokerconfigs

Alex H
- 1,814
- 11
- 18
0
You can use this pattern kafka.server:type=app-info,id=*
to obtain that broker's ID.
While sending to broker 1's Jolokia endpoint, here is what it returns:
{
"request": {
"mbean": "kafka.server:id=*,type=app-info",
"type": "read"
},
"value": {
"kafka.server:id=1,type=app-info": {
"StartTimeMs": 1575897801771,
"Version": "2.3.1",
"CommitId": "18a913733fb71c01"
}
},
"timestamp": 1576320157,
"status": 200
}

Frank Wong
- 101
- 3