sh_cy
sh_cy

Reputation: 28

relative time on grafana dashboard/panel keeps getting overridden by dashboard time range

I am having trouble with setting up a panel that shouldn't include the time range set for the entire dashboard, but have its own time range set. From what I have read, the option to do that is in the Query Options called "relative time".

my query with relative time set

my result

It basically keeps using the 5 Minute range set on the dashboard time range. Though, once I hit the "run queries" button, the correct panel actually shows up for like 500ms with a time range of 24 hours and then gets overriden by the dashboard time again.

this is what shows up for like 500ms once I hit the "run queries" button (this is what i want)

I'm basically trying to have a dashboard that has a stat panel which shows the current CPU usage and below I'd like to have a time range panel which shows the cpu usage from a 24 hour range. My dashboard's refresh time is set to 5 seconds and every 5 seconds it also shows the correct panel with a time range of 24 hours but again just for like 500ms and it keeps getting overriden to 5 minutes afterwards.

I am using Grafana 10.0.3

Upvotes: 0

Views: 654

Answers (1)

adgud
adgud

Reputation: 31

I've had the same problem and I managed to solve it by editing the dashboard's JSON model and changing the .liveNow variable to false.

I noticed this difference when following @sh_cy comment I created a new dashboard and the relative panel worked fine there. I compared the JSON models and saw that .liveNow is different, I changed it and it started to work as expected.

Upvotes: 1

Related Questions