What Grafana version and what operating system are you using?
v9.2.0
I have a Grafana dashboard displaying multiple panels which display html with variables in them which retrieve data from a MSSQL source. The dashboard has recently been reported as displaying false information.
All of the variables are set to refresh on load but when they load they are displaying data from over two years ago.
If I change the variable to refresh on time change, they initially load with old data but then when I change the time range the data refreshes with the current (correct) data.
If I switch back the variable to refresh on page load, it goes back to 2 year old data.
I know on premise has no caching in it but it was working until recently and the dashboard hasnāt changed in the last year.
Just adding to this, it looks like its the variable thatās doing this.
If I put the SQL in a Stat panel then the value displays correctly but if I put the SQL in a variable and display that variable using āSelect $variablenameā in the stat panel OR use a text panel and apply $variablename as the text then it seems to load a cached version of the variable.
Also, some of my variables are populated with values returned from other variables. I order the variables so that the ones required for other variables are at the top of the list.
If the linked variables werenāt returning the data before the required variable had completed then the result should be no data, no cached data.
Iām hoping this might be useful to somebody.
This has been working for some time now, but something has changed
OK, so I have switched most of the text panels to table or single stat columns. Putting the SQL from the variable into the data panel. This is now refreshing as expected.
However, I kept 3 variables (One custom list, 2 SQL lookups using the custom list and a parameter) and was unable to use the SQL based variables in the table or SingleStat SQL lookup.
Var1 = A,B,C
Var2 = Select value from table where column = $Var1
Var3 = Select value2 from table2 where column = $Var2
There issue seems to be that the variables are loading a cached version of the variable and not refreshing it on load. if I change the variable to refresh on time change, then it does refresh but putting it back on āOn loadā reverts it back to this ācached versionā
I tried re-creating the dashboard from scratch and within about 4 panels experienced the issue again.