Get queue message counts from grafana

672 views
Skip to first unread message

Cihan Tunali

unread,
May 16, 2022, 9:27:37 AM5/16/22
to rabbitmq-users
Hello,
I enabled prometheus plugin and using RabbitMQ's own dashboards to visualize my environment. I want to create a dashboard to see top 10 queues with messages. To achieve this, I get metrics from /metrics/per-objects endpoint. But when I scrape it, original RabbitMQ dashboards gone mad and did not show any data. 

Is somebody do this configuration before? Any help will welcome :) Thanks.

Michal Kuratczyk

unread,
May 16, 2022, 5:17:14 PM5/16/22
to rabbitm...@googlegroups.com
Hi,

/metrics/per-object is not just a superset of what /metrics normally return. I'd suggest leaving /metrics as the main target for Prometheus and adding this one as the second one: /metrics/detailed\?family=queue_coarse_metrics
The standard dashboards should work in this case (because all the expected metrics will be collected from /metrics), but the second endpoint will add per-queue details on top of it:

curl -s http://localhost:15692/metrics/detailed\?family=queue_coarse_metrics | grep ^rabbitmq_detailed_queue_messages_ready
rabbitmq_detailed_queue_messages_ready{vhost="/",queue="myqq"} 75
rabbitmq_detailed_queue_messages_ready{vhost="/",queue="myqq2"} 2

Now it's just a matter of writing a PromQL query.

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/e905e71f-97f3-4d76-8bf7-436f98bdeb4bn%40googlegroups.com.


--
Michał
RabbitMQ team

Cihan Tunali

unread,
May 18, 2022, 9:35:34 AM5/18/22
to rabbitmq-users
I added /metrics/detailed endpoint without touching /metrics one at prometheus.yml file. After this modification, existing dashboards gone mad and did not collect data. I will try to add both endpoint and I might modify existing dashboard. Thanks.

17 Mayıs 2022 Salı tarihinde saat 00:17:14 UTC+3 itibarıyla mkura...@gmail.com şunları yazdı:

Michal Kuratczyk

unread,
May 18, 2022, 11:18:35 AM5/18/22
to rabbitm...@googlegroups.com
There is nothing mad about the dashboard's behaviour - it either gets the data it expects or it does not. :)

Some basic troubleshooting for Prometheus/Grafana:
* curl the prometheus endpoint to see if you get the expected metrics (curl ...:15692/metrics/...)
* check Prometheus target scraping information to see if the above endpoint is scraped successfully
* optionally, check in Prometheus UI, that you can query/visualize the data
* check if you can add a simple panel to Grafana (add new and put a metric name as the query)

If nothing works - I'd start from the top. If it used to work, I'd start from the bottom of this list.

Best,



--
Michał
RabbitMQ team

Cihan Tunali

unread,
May 23, 2022, 6:37:01 AM5/23/22
to rabbitmq-users
When I enabled to collect detailes per-object, dashboard give errors. 



1.jpg

2.jpg
18 Mayıs 2022 Çarşamba tarihinde saat 18:18:35 UTC+3 itibarıyla mkura...@gmail.com şunları yazdı:

assya miraoui

unread,
May 23, 2022, 6:47:46 AM5/23/22
to rabbitmq-users
Does anyBody use RabbitMQ with IBM ACE please ?
Reply all
Reply to author
Forward
0 new messages