Grafana 5.1.3: Unable to set variable refresh to 'Never' via json

Hi,
When I’m trying to set the variable refresh time to Never and On Dashboard Load from UI, I’m getting the refresh value in dashboard json as "refresh": 1 . So I’m confused on setting up the Never value via dashboard json. I need the refresh value as Never. How can I set that? And with value as 1, the variable is getting the value as On Dashboard Load.
Need help with this…

image

Hi,
When I’m trying to set the variable refresh time to Never and On
Dashboard Load
from UI, I’m getting the refresh value in dashboard json
as "refresh": 1 . So I’m confused on setting up the Never value via
dashboard json. I need the refresh value as Never. How can I set that?

Try “refresh”: “”

And with value as 1, the variable is getting the value as On Dashboard
Load
. Need help with this…

I’m not quite sure what you mean by that part, but see whether the “” blank
setting does what you need, and ask again if there’s something else needed.

Antony.

Hi @pooh , thanks for quick response.
But passing “refresh”: “” in the json. I’m getting Templating init failed error in dashboard
image
, and the refresh value is getting set to empty.
image
It still did not resolve my issue.

And with value as 1, the variable is getting the value as On Dashboard
Load
. Need help with this…

With this, I meant that if I set "refresh": 1 in the json and create the dashboard , then the refresh value is set to On Dashbhoard Load. When using the UI, if I set the refresh value to Never and extracts the json, it still has "refresh": 1.

Found the issue.
The variable whose refresh value is being set as Never , i.e. "refresh": 0 and if that variable is being used in another query then the variable needs to be passed every time in the URL with its value. Else it throws the error.

Thanks for the response. :slightly_smiling_face: