You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @alexadmin I'll invite you to explain your use case a bit further, in particular where to obtain these labels from...? @braedon will correct if I'm wrong, but I think the "hits" metric is taken from the results of ES, which is basically a count(*) aggregation on all results which will therefore be absent of any field, by definition - if your intention was to use those as labels, as your reference to mysql's exporter' QueryValueColumns seems to suggest.
I do have a use case for labels, and they could even be static: we run the same query for multiple namespaces and, in order to distinguish between them, we have to use 'agg' (aggregation) which will then produce a metric "by_namespace". The problems with this approach are 1) that we have these multiple queries all running the same query, multiple times and 2) there is an inevitable overlapping with the "hits" metric, obviously.
I just had a look at the code, it's fairly simple to add static labels... @braedon would you be willing to merge a PR for this?
Is it possible to add labels to query metrics? I only noticed that function in MySQL exported
https://github.com/braedon/prometheus-mysql-exporter/blob/master/exporter.cfg
"QueryValueColumns = ni,ptang"
thank you.
The text was updated successfully, but these errors were encountered: