Issue: Receiving “An unexpected error happened” when loading some dashboards. Once the error has occurred all dashboards that were working now display to same message until a hard reload in he browser is done.
Actual error message:
Error: Invalid interval string, has to be either unit-less or end with one of the following units: “y, M, w, d, h, m, s, ms”
Grafana version: 7.0.2
Data source: InfluxDB
Experienced this also. For me, it was caused by having refresh intervals set to “off”.
If you’re comfortable modifying the Grafana database, stop the service and open with an SQLite editor and copy out the JSON from the dashbord table.
In the JSON, locate:
Replace the “off” with:
Copy the JSON back into the dashboards table and start the service.
Take a backup, worked for me and may not work for you.
still having this issue on 8.1.5. Looks like a bug in handling empty interval value.
This results int the following stack trace:
PanelQueryRunner Error Error: Invalid interval string, has to be either unit-less or end with one of the following units: "y, M, w, d, h, m, s, ms"
at x (app.77c130bd0edeb5f6b6e6.js:6158)
at Module.w (app.77c130bd0edeb5f6b6e6.js:6158)
at U.createQuery (:3000/public/build/prometheusPlugin.77c130bd0edeb5f6b6e6.js:1)
at U.prepareTargets (:3000/public/build/prometheusPlugin.77c130bd0edeb5f6b6e6.js:1)
at U.query (:3000/public/build/prometheusPlugin.77c130bd0edeb5f6b6e6.js:1)
at x (app.77c130bd0edeb5f6b6e6.js:6060)
at O.run (app.77c130bd0edeb5f6b6e6.js:3156)