How can I show all dynamic metrics with grafana?
Asked Answered
G

2

9

I'm usign prometheus with grafana.

I send dynamic counters. The counters are ended with a pattern, for example "_graph".

How can I show in a graph all the metrics which ends with "_graph"?

Gorton answered 14/8, 2019 at 8:31 Comment(0)
J
7

In grafana query user this:

{__name__=~".+_graph"}

This will show all the metrics with _graph suffix.

Probably you want to use sth like

rate({__name__=~".+_graph"}[5m]) 

if these are counters.

Jarrodjarrow answered 14/8, 2019 at 8:34 Comment(2)
That second query will fail, this sounds like a case for labels but barring that robustperception.io/extracting-labels-from-legacy-metric-names.Efflux
Yup, you're totally right. If there was no requirement to have range specification preceded by metric selector than rate requirement for single name could be appeased by lable_replace.Jarrodjarrow
Q
1

After selecting the Explore (compass); Metric Browser has drop down where we can see all the metric names.

enter image description here

Quass answered 16/5, 2022 at 8:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.