Kafka MCQs – Kafka Monitoring and Metrics

11.) Which metric helps in tracking the replication status of Kafka topics?

A) kafka.log.segment.size
B) kafka.cluster.PartitionsUnderReplicated
C) kafka.network.thread.count
D) kafka.message.timestamp

Answer: Option B

Explanation: This metric indicates if all partitions are properly replicated across brokers.

12.) What metric helps monitor Kafka disk usage?

A) kafka.disk.usage
B) kafka.server.log.dirs.DiskUsage
C) kafka.topic.bytes.total
D) kafka.replication.buffer.size

Answer: Option B

Explanation: This metric tracks how much disk space Kafka is consuming per broker.

13.) Which tool can be used to explore Kafka JMX metrics interactively?

A) Zabbix
B) Grafana
C) JConsole
D) Kafka Connect

Answer: Option C

Explanation: JConsole allows you to browse JMX metrics interactively in a GUI.

14.) What is the ideal value of UnderReplicatedPartitions in a healthy Kafka cluster?

A) 0
B) 10
C) 5% of total partitions
D) Unlimited

Answer: Option A

Explanation: Ideally, all replicas should be in-sync, so no under-replicated partitions should exist.

15.) What is a metric name prefix commonly used in Kafka JMX?

A) jvm.kafka.io
B) broker.admin.metrics
C) kafka.monitor
D) org.apache.kafka

Answer: Option D

Explanation: Kafka JMX metrics typically use the prefix org.apache.kafka.

16.) Which command can help monitor Kafka consumer group lag?

A) kafka-topic.sh
B) kafka-consumer-groups.sh
C) kafka-configs.sh
D) kafka-run-class.sh

Answer: Option B

Explanation: This command-line tool helps inspect consumer lag and group status.

17.) What Kafka metric monitors client request rejections due to quota limits?

A) kafka.network.RequestMetrics.ThrottleTimeMs
B) kafka.server.ClientRequestErrors
C) kafka.broker.ClientThrottleTime
D) kafka.quota.limit.exceeded

Answer: Option A

Explanation: This metric tracks how much time Kafka spends throttling client requests.

18.) How often does Kafka emit metrics by default?

A) Every 1 second
B) Every 15 seconds
C) Every minute
D) Configurable

Answer: Option D

Explanation: Kafka emits metrics based on configuration, typically defined in metrics.sample.window.ms.

19.) Which Kafka CLI can be used to check broker log directory status?

A) kafka-disk-check.sh
B) kafka-broker-status.sh
C) kafka-log-dirs.sh
D) kafka-debug.sh

Answer: Option C

Explanation: This script helps inspect log directory size and broker storage.

20.) What is the metric that shows how often ZooKeeper reconnects?

A) zookeeper.reconnect.rate
B) kafka.zookeeper.disconnect.count
C) kafka.controller.zkDisconnectRate
D) kafka.server.zkSessionExpireRate

Answer: Option D

Explanation: This shows the rate at which sessions with ZooKeeper expire, indicating potential connection issues.

Leave a Reply

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