Is it possible to use variables in metric?

Is it possible to use variables in metric? Look at the picture, please.

yes it should be possible

Thank you. Could you prompt me, please, what correct syntax is?

I know nothing about Prometheus

but i thing that you are wrong with quotes.

sum(rate(core_${format}_request_count{mode="$mode", rack=~"$rack", instance=~"$host"}[1m])*60)

Thank you! This works! Now I can make one dashboard instead four :slight_smile:

1 Like