HandsDown
HandsDown

Reputation: 33

Using Grafana Variable in Prometheus Query

I'm trying to use a variable at the start of one of my PromQL queries so I can return data based on the variable. Not sure if this is possible or not.

$variable_totalaccuracy_total

Expected to return the totalaccuracy for the variable but get back

error:"parse error at char 1: unexpected character: '$'"

Upvotes: 1

Views: 6142

Answers (1)

Use braces around the variable name:

${variable}_totalaccuracy_total

Upvotes: 3

Related Questions