Closed Tezar closed 4 years ago
Yes, it is possible. But it'll get some time because changes will have to be made in the grafana plugin and in the database.
Why built-in Grafana time-shift function doesn't work for you?
Timeshift works on whole graph. So I can make two separate graphs, but you cant get good comparsion from that (since axis are usually both set on auto). Ability to set shift per metric is already supported by some datasources because of this.
I implemented this feature but because of Grafana limitation I had to match timestamps with current time-range. So if you'll hover your cursor over the panel the timestamp will be the same for both normal and shifted series. It's not very intuitive. Can be solved by setting proper alias for shifted metrics.
If you want to test this feature, you can check out time-shift-parameter branch. There is a time-shift field in the query editor which can be used to shift series back. You can specify only simple intervals now using
Great, works for some quick test I tried, thanks. Tiny difference in handling time shift value: grafana doesn't allow negative values. Getting data from yesterday is "24h" in grafana, but "-24h" in your plugin. While I would argue, that negative timeshift makes more sense, grafana uses it inversely and that may spark some misunderstandings. Maybe info in the tooltip would be enough.
Couldn't find any link to beer fund :beer: ?
:smiley:
I'm going to change the shift value direction to match grafana behaviour and reorganize UI a bit since it's getting a bit clunky.
No beer fund unfortunately. But you can help the project by doing what you're already do. Use the database and give feedback and share the results.
Would it be possible to add options to set timeshift per query/series? It would be nice to be able to compare current trend with day before in one graph.