Bird
Raised Fist0

You want to alert when the Kafka broker's RequestQueueSize exceeds 100 for more than 5 minutes. Which metric and approach should you use?

hard🚀 Application Q8 of Q15
Kafka - Monitoring and Operations

You want to alert when the Kafka broker's RequestQueueSize exceeds 100 for more than 5 minutes. Which metric and approach should you use?

AMonitor <code>kafka.network:type=RequestMetrics,name=QueueSize,request=Produce</code> and trigger alert if value > 100 for 5 minutes
BMonitor <code>kafka.network:type=RequestMetrics,name=RequestQueueSize</code> without request type and alert immediately
CUse <code>UnderReplicatedPartitions</code> metric to detect queue size issues
DMonitor <code>RequestHandlerAvgIdlePercent</code> and alert if below 50%
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct metric for request queue size

    The metric with name=QueueSize and request=Produce is the correct one to monitor queue size for produce requests.
  2. Step 2: Define alert condition

    Trigger alert if the metric value exceeds 100 continuously for 5 minutes to avoid false positives.
  3. Final Answer:

    Monitor kafka.network:type=RequestMetrics,name=QueueSize,request=Produce and trigger alert if value > 100 for 5 minutes -> Option A
  4. Quick Check:

    QueueSize metric + threshold + duration = Alert condition [OK]
Quick Trick: Use specific request type in QueueSize metric for accurate alerts [OK]
Common Mistakes:
MISTAKES
  • Ignoring request type in metric name
  • Using unrelated metrics for queue size alerts

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes