Kafka MCQs – Kafka Monitoring and Metrics

21.) In Prometheus, what label is typically used to distinguish Kafka brokers?

A) broker_instance
B) kafka_id
C) instance
D) topic_id

Answer: Option C

Explanation: instance is a common Prometheus label that represents the hostname:port of the broker.

22.) What Kafka metric indicates how often controller leadership changes?

A) kafka.controller.activeCount
B) kafka.controller.leaderElectionRateAndTimeMs
C) kafka.broker.rebalance.count
D) kafka.partition.shutdowns

Answer: Option B

Explanation: This metric shows how often and how quickly controller elections occur.

23.) What is a red flag in Kafka controller metrics?

A) High controller ID
B) Frequent controller elections
C) Zero controller count
D) Duplicate controller metrics

Answer: Option B

Explanation: Frequent controller changes can signal instability in the cluster.

24.) Which metric can indicate if producers are getting throttled?

A) kafka.server.throttleTimeMs
B) kafka.producer.send.errors
C) kafka.topic.limit.exceeded
D) kafka.replica.delay

Answer: Option A

Explanation: This metric shows if producers are being throttled due to quota violations.

25.) Kafka exposes JMX metrics by default on which port?

A) 8080
B) 7203
C) 9999
D) 9092

Answer: Option C

Explanation: By default, JMX metrics are exposed on port 9999, but it can be configured.

Leave a Reply

Your email address will not be published. Required fields are marked *