2

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.

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

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
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.