-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Prometheus: a way to include custom labels into per-object metrics #13724
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
Comments
@blowfishpro are you aware of nodes and cluster tags? We can probably reuse them and add them as labels instead of introducing a yet another set of tags. |
I was not though we already have a way to (externally) add tags at the RabbitMQ cluster level, I was specifically requesting something more granular than that. |
@blowfishpro sorry, I'm not sure if I understand. Are you aware of these two existing tagging mechanisms? Are you suggesting that we use them in the Prometheus plugin? I am not eager to introduce a yet another tagging mechanism. We already have cluster tags, node tags, and have had virtual host tags for a decade. |
Regarding vhosts, I think we can indeed use existing vhost tags and emit a For queues, in RabbitMQ 4.1, We'd also need some conflict resolution mechanism - in 4.1 the metric looks like this:
In the future we may want to add more information to that metric, which could conflict with user-provided tags. I guess the resolution would need to be "built-in labels win" (a tag with a conflicting name is not exposed as a Prometheus label). |
Is your feature request related to a problem? Please describe.
We put a lot of queues into each RabbitMQ cluster, many of which are related in various ways. Some of this information can be parsed out of the queue names we generate but this is rather limited. It would be great if we could add per-object custom labels to queue metrics (and e.g. exchange metrics) that we could then use in our observability and monitoring.
Describe the solution you'd like
Custom labels could be set via arguments when a queue/exchange is declared, e.g.
Those labels would then be added to the per-queue/exchange metrics generated by the prometheus plugin.
Describe alternatives you've considered
There's some information we can include in e.g. queue names and then parse out later. That's fairly limited though.
Additional context
Could it also be useful to add per-vhost labels that are added to the metrics for all queues and exchanges within that vhost?
The text was updated successfully, but these errors were encountered: