Bad duration syntax using Kube Prometheus Stack

Hello, I am trying to setup Kube-Promethues-Stack and am experiencing issues. For some reason, some charts are returning a bad duration syntax (12m0 or 8m0). After fiddling around and trying to find the issue, it seems as though it comes down to the $__rate_interval. After testing the queries in the Prometheus UI, durations get parsed as such:

12m0s - 12m0 (Error executing query: invalid parameter ‘query’: 1:103: parse error: bad duration syntax: “12m0”)
1h1m1s - 1h1 (Error executing query: invalid parameter ‘query’: 1:103: parse error: bad duration syntax: “1h1”)
12m - 12m (no error of course)

It seems as though it wants to stop parsing the duration past the first symbol that it finds and parses only one additional character. Keep in mind, I have not edited anything and this is the default charts and queries provided by the stack.

Grafana Version: 9.4.7, Kube-Prometheus-Stack version: 45.21.0

One of the errors on the charts: bad_data: 2:130: parse error: bad duration syntax: “12m0”
Specific chart being described is Node Exporter / Nodes CPU Usage, however, this error occurs on other charts too.

1 Like