Support additional dataset when performing expressions #65387
Closed
Gauravshah
announced in
Alerting
Replies: 1 comment
-
Hello, as you may have heard, we are transitioning away from using discussions to discuss feature requests. This discussion is a little unclear, as it seems to be around multiple datasets but transitions into a request for a moving average over time. Feel free to make an issue defining what feature you would like added. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As per the discussion here #15696
It was suggested that we use expr instead of attempting to build a backend plugin that connects to two datasource.
The first thing that we wanted to implement is a moving average that would smoothen the graph.
Moving average of 7 days works by taking 7 days of sliding windowed data and then averaging out them.
So for 7th of Jan value it would take in data from 1st Jan to 7th Jan , average it and set it for Jan 1. For 8th of Jan value it would take in data from 2nd Jan to 8th Jan , average it and set it for Jan 2.
So when the series it plotted for Jan 8th to Jan 10, it would need access to Jan 2nd to Jan 10 data to be able to compute the moving average for those 3 days.
I was taking a look at resample.go
It has access to series and not to the datasource, so how do we plan to support this access to within the MovingAverage expr to access data beyond what are the data points ?
PS : I have limited experience in grafana development ( and no clue of Go )
cc @kylebrandt
Beta Was this translation helpful? Give feedback.
All reactions