Reputation: 101
Is there a way to monitor a particular queue on RabbitMQ using "rabbitmq_prometheus" plugin? I am looking something like if a particular queue has 0 consumers, Prometheus should monitor it.
"rabbitmq_queue_consumers" metric gives sum of consumers for all queues for that instance but I am looking for a particular queue, something like
rabbitmq_queue_consumers{queue=service-queue-A}
Upvotes: 1
Views: 9636
Reputation: 1
Try /metrics/detailed , /metrics/per-object can cause great overhead.
example: https://hodovi.cc/blog/rabbitmq-per-queue-monitoring/
Upvotes: 0
Reputation: 747
If you prefer to return per-object (unaggregated) metrics on the /metrics endpoint, set prometheus.return_per_object_metrics to true:
prometheus.return_per_object_metrics = true
in the rabbitmq config file.
RabbitMQ offers a dedicated endpoint, /metrics/per-object
, which always returns per-object metrics, regardless of the value of prometheus.return_per_object_metrics
more information. https://www.rabbitmq.com/prometheus.html
Upvotes: 4