Monitoring Queue/Exchange Rates With Prometheus

352 views
Skip to first unread message

Dave Seltzer

unread,
Nov 1, 2021, 8:38:01 PM11/1/21
to rabbitmq-users
Hello!

I'm currently running RabbitMQ 3.9.8 in Kubernetes (managed by the RabbitMQ Operator)

I'm using Prometheus to instrument my message queues with a ServiceMonitor:

kind: ServiceMonitor
metadata:  
  name: my-rabbit-servicemonitor
  namespace: default
spec:
  endpoints:
  - interval: 15s
    port: prometheus
    scheme: http
    scrapeTimeout: 14s
  - interval: 15s
    params:
      family:
      - queue_coarse_metrics
      - queue_consumer_count
      vhost:
      - /
    path: /metrics/detailed
    port: prometheus
    scheme: http
  selector:
    matchLabels:
      app.kubernetes.io/name: my-rabbit

The cluster only has a few hundred queues, so we're pulling queue_coarse_metrics from the detail view.

This lets me alarm based on queue-depth, which is important. But, I'd also like to be able to raise an alarm when messages stop arriving in a queue (or when they stop arriving at an exchange.)

Is there some way to expose either "Message Rate In" of an Exchange or the "Incoming" rate of a queue?

Many thanks!

-Dave



Michal Kuratczyk

unread,
Nov 2, 2021, 6:34:56 PM11/2/21
to rabbitm...@googlegroups.com
Hi,

You can query /metrics/detailed/?family=channel_queue_exchange_metrics if that's what you are looking for.
You can also just try /metrics/per-object - with a few hundreds queues it may be sufficiently fast.
Also, some massive performance improvements are coming to /metrics/per-object endpoint - it should become
a viable option even for clusters with many more queues:

Best,

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/5c38f3b2-9100-4fa2-aa4e-81ee4bfdc89cn%40googlegroups.com.


--
Michał
RabbitMQ team
Reply all
Reply to author
Forward
0 new messages