I have data for the past two years. Now I would like to limit a few panels in terms of the time frame that can be set. For example I want a few specific panels to ignore the data from before 2017. So if I choose the time frame January 2016 to February 2017 on the upper right hand corner in Grafana, I want those panels to only display the data for January and February of 2017.
I’ve gotten similar questions to this a few times now so I decided to add two new quick ranges - This month so far and This year so far. But I’m not sure if that is what you are asking for. Do you want to exclude March, April and May?
Anyway, if This year so far is a good solution you can use today’s build (or if you wait a week it will be included in the 4.3.0 release).
The new quick ranges can be used in the Time Range override feature for the Graph Panel in the Override relative time field (now/y for this year so far and now/M for this month so far):
This is really cool, but its not totally clear how to translate a quick range to relative time + timeshift in a panels Time range.
More specifically I’m trying to have a table panel show summary data for “Yesterday”
I want the panel to show data from yesterday 00:00:00 to yesterday 23:59:59 - just like using the quick range "Yesterday"
1d/d set the “from” correctly, but the panel will show data until now, so I have been trying to use last 1d, but cannot seem to generate a time shift that corresponds to current time
ok, this is a bit weird. Override relative time set to this day so far (now/d) and then time shifted one day + rounded up/down (1d/d). This is a bit of hack rather than something that should actually work…
I hope you will help me to solve my problem/
I use datasourse Postgresql. I can’t set up “Time range” for panel singlestat.
I want to see value for last week, last month.
What i should write
You can always manually set the query, which ignores any date ranges top right. You could have a filter in your where statement incorporated with the top right time filters. i.e. Filter out time less than January 2017.
In my case I get sunrise/sunset data once a day. My dashboard defaults to 6 hours so no data comes in after 6 hours goes by. I just ignore the $timeFilter since I only want the last record. Here is an example of manually editing the query: