Prometheus & Per-Object Metrics

993 views
Skip to first unread message

Todd Yilk

unread,
Apr 1, 2021, 6:32:12 PM4/1/21
to rabbitmq-users
Hello fellow RabbitMQ'ers,

Using 3.8.14 w/ erlang 23.3, I'm trying to get expanded metrics from the rabbitmq_prometheus plugin but toggling prometheus.return_per_object_metrics between true and false in rabbitmq.conf makes no difference.

With 3.7 and the prometheus_rabbitmq_exporter plugin I would get per queue values for, for example, rabbitmq_queue_messages_published_total. After upgrading I can only get aggregated values for the entire broker.

What am I doing wrong? Thanks!

Michal Kuratczyk

unread,
Apr 2, 2021, 5:00:35 AM4/2/21
to rabbitm...@googlegroups.com
Hi,

Well, the setting is there and should work so it sounds like your config changes are not applied. There is one more option though, In the recent versions (3.8.14 for sure), you can scrape /metrics/per-object endpoint to get per-object metrics regardless of the configuration. This way you can scrape aggregated metrics most of the time and per-object metrics less often or only when required (since they can be expensive to scrape in a large system).

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/ff77b5ec-d738-4d0b-bf18-d19cf27749ben%40googlegroups.com.


--
Michał
RabbitMQ team

Todd Yilk

unread,
Apr 5, 2021, 5:18:44 PM4/5/21
to rabbitmq-users
Thanks for the reply, Michał. The /metrics/per-object endpoint is very helpful.

I discovered rabbitmq_prometheus is, in fact, returning per-object metrics for almost every metric except the one I happened to be inspecting: rabbitmq_queue_messages_published_total. Per this ticket, https://github.com/rabbitmq/rabbitmq-server/issues/2783, there's apparently an issue with keeping aggregated counters.

Thanks again,
Reply all
Reply to author
Forward
0 new messages