-
What Grafana version and what operating system are you using?
Grafana OSS 10.0.2 running in Kubernetes as described here: Deploy Grafana on Kubernetes | Grafana documentation -
What are you trying to achieve?
I am trying to save a dashboard with updated expressions used in a panel as an Admin user. -
How are you trying to achieve it?
I added a data source (Prometheus) and imported a simple dashboard (just two panels). Then I opened the panel/query editor and updated the expression as follows:
sum(jvm_memory_used_bytes{application=“$application”, exported_instance=“$exported_instance”, area=“heap”})*100/sum(jvm_memory_max_bytes{application=“$application”,exported_instance=“$exported_instance”, area=“heap”})
- What happened?
The panel shows the expected values when “Run queries” button is clicked. Also, I can click “Apply” button and return back to the dashboard. Unfortunately, I get “Access denied error” to URL “/api/dashboards/db” whenever I try to save the dashboard. The Grafana log is empty. I also get a similar error when trying to import the dashboard containing the expression mentioned above.
Then, I change the expression to this:
jvm_memory_used_bytes{application=“$application”, exported_instance=“$exported_instance”, area=“heap”}
After this change, the panel shows the raw time series used for the calculation mentioned above. Both the “Run queries” and “Apply” buttons work as expected. Also, now I am able to save the dashboard.
-
What did you expect to happen?
I expect the dashboard could be saved even with the expression containing the sum() function, namely when the query works well, and the dashboard shows expected numbers. -
Can you copy/paste the configuration(s) that you are having problems with?
I use the default configuration as described in the link pasted above.