Which RabbitMQ metric best indicates the current number of messages waiting to be processed in a queue?
Think about messages that are ready but not yet delivered to consumers.
rabbitmq_queue_messages_ready shows how many messages are waiting in the queue to be delivered to consumers. This helps monitor backlog.
What is the output of this command showing the number of consumers for a queue named 'task_queue'?
rabbitmqctl list_queues name consumers | grep task_queue
The number after the queue name shows how many consumers are connected.
The output format is <queue_name> <number_of_consumers>. Here, '1' means one consumer is connected to 'task_queue'.
You notice RabbitMQ is using excessive memory. Which metric helps identify if queues are causing this issue?
Memory usage by queues is tracked in bytes.
rabbitmq_queue_memory_bytes shows how much memory each queue is using. High values here indicate queues consuming a lot of memory.
Which combination of metrics is best to monitor for early detection of RabbitMQ performance issues?
Focus on message backlog and resource usage.
Monitoring rabbitmq_queue_messages_ready helps detect message backlog, while rabbitmq_queue_memory_bytes tracks memory usage. Together, they provide early warning signs.
Arrange the steps in the correct order to monitor RabbitMQ metrics with Prometheus:
Think about enabling metrics first, then configuring Prometheus, then verification, then alerts.
First, enable metrics by installing the plugin. Next, configure Prometheus to scrape metrics. Then verify metrics are accessible. Finally, create alerts.