Selecting different variable value is not feeding through to queries

  • What Grafana version and what operating system are you using?
    8.1.4
    I have recently updated from version 7 and don’t remember this issue before so it’s possible its a very recent bug.

  • What are you trying to achieve?
    Changing a variable i.e. $hostname should update a query when it is changed. (It randomly stops after first few changes)

  • How are you trying to achieve it?
    I have setup a variable. I have both generated the variables through a select and hardcoded them. If reference them in the grafana query using $hostname. Then change them on the dashboard.

  • What happened?
    Initial it loads with the correct information. You can change hostname and sometimes it updates the dashboard but eventually changing it subsequent times will stop one or more of the tiles from updating.
    Using the Query inspector you can see that it will stop propagating through at a certain point in time.

  • What did you expect to happen?
    I expect changing the variable to always update the queries related to it.

  • Can you copy/paste the configuration(s) that you are having problems with?
    Not sure what I can send that is useful. It is a very simple setup.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No errors.

  • Did you follow any online instructions? If so, what is the URL?
    I could not find any instructions around this problem.

Anyone got a suggestion as you what to try next on this one?

Could you provide more information about the query

  • which data source are you using?
  • what does the query look like?
  • how do you know that it is not updating? Are you looking at the network tab in Chrome to see that no new queries are being triggered? Or does the data in the panel not match the $hostname value?

The data source is postgreSQL 12.

Multiple queries are failing to update. It is random as to how many fail. An example query that is not working is :

SELECT
$__unixEpochGroupAlias(nanoseconds/1000000000, $__interval),
sum(abs(quantity)) OVER (ORDER BY nanoseconds) AS lots
FROM fill
WHERE
$__unixEpochNanoFilter(nanoseconds)
and host=’$Hostname’
ORDER BY 1

The data in the panel does not match the $hostname value for some of the panels.

This topic was automatically closed after 365 days. New replies are no longer allowed.