3

Hi I'm forcing problem with histogram_quantile. If I'll set my variable to multi-value so I can repeat panels. Then I got error which says

parse error at char 21: unexpected character: '\'

My request is:

histogram_quantile($percentile, avg((rate(http_server_requests_seconds_bucket{instance=~"$server"}[1m]))) by (le, application))

$Percentile variable is initiated as custom with values as below and multi-value selected

0.9, 0.5, 0.99
MrNetroful
  • 497
  • 8
  • 28

2 Answers2

3

The default format for variables escape the . with a backslash, so 0.5 becomes 0\.5.

To not escape ., you can use another format on the variable like this: ${percentile:raw}.

More information on format options here.

Eric M.
  • 2,507
  • 2
  • 10
  • 15
2

The histogram_quantile function requires a single floating point number as an input, and the multi-value feature of Grafana will produce something like 0\.9|0\.5|0\.99 which is not a floating point number. You will need to use multiple expressions for this.

brian-brazil
  • 31,678
  • 6
  • 93
  • 86