Apply an offset of one day to the x axis in Grafana (Prometheus data source)

I created a metric to count the unique identifiers in the dataset yesterday and scrap it into prometheus. Thus, yesterday's score was 100, this value will be reported all day until tomorrow, when today the count will be counted, and then it will be reported throughout the day.

So far so good. Now, when I show the value of 100 in Grafana, it will show it with today's date, when the actual value is actually yesterday.

Is there a way to just shift the x axis in Grafana by -1dto align dates and values ​​again and again, i.e. change the date of the scratch to the date "value" if you will?

I know there is a temporary shift in Grafana, but that just makes up for the cleanup date. I also know the prometheus 'offset' statement, which will do the same.

What I'm looking for is just to tell Grafana that he should display “now” as “now-1d”.

I found a toolbar level option that is marked as "Now delay now." However, this also does not shift the x axis and does not change anything to display.

Grafana version 4.1.1, Prometheus version 1.5.3

+5
source share

Source: https://habr.com/ru/post/1673093/


All Articles