Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rabbitmq_endpoint label to rabbitmq_identity_info (backport #13218) (backport #13237) #13239

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Feb 11, 2025

This allows to differentiate between metrics with the same name, coming from the /metrics/ endpoint and those coming from /metrics/per-object (or from /metrics with prometheus.return_per_object_metrics = true).

The lack of such differentiation can easily lead (and leads in our Grafana dashboard) to some values being doubled if both endpoints are scraped (which is a reasonable thing to do - collect aggregated metrics often for a high-level overview and per-object metrics less often not to overload the system). This leads to metric series like these:

# aggregated metric
rabbitmq_queue_messages_ready 53
# per-object metrics
rabbitmq_queue_messages_ready{vhost="/",queue="qq-2"} 20
rabbitmq_queue_messages_ready{vhost="/",queue="qq-3"} 20
rabbitmq_queue_messages_ready{vhost="/",queue="qq-1"} 13

a PromQL query such as sum(rabbitmq_queue_messages_ready) returns 106, even though there are only 53 messages ready. With this change, you can write a query such as rabbitmq_queue_messages_ready * on (instance, job) rabbitmq_identity_info{rabbitmq_endpoint="aggregated"} so that per-object values are ignored


This is an automatic backport of pull request #13218 done by Mergify.
This is an automatic backport of pull request #13237 done by Mergify.

(cherry picked from commit 703ee85)
(cherry picked from commit b35ffe1)
@michaelklishin michaelklishin added this to the 4.0.7 milestone Feb 11, 2025
@michaelklishin michaelklishin merged commit e0d53d6 into v4.0.x Feb 11, 2025
90 of 92 checks passed
@michaelklishin michaelklishin deleted the mergify/bp/v4.0.x/pr-13237 branch February 11, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants