Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving Average: support of movingAverageUnits instead of Period to give flexibility to adapt to any needed time window #107

Open
arigit opened this issue Aug 13, 2020 · 1 comment

Comments

@arigit
Copy link

arigit commented Aug 13, 2020

With reference to the discussion in #104

My use case: I have an IP bandwidth graph that is sampled once every 10 seconds. I am trying to use the Moving Average meta-query to add a moving average curve, and I need the time-window of the moving average to be 5 minutes, ie 30 samples.

I just discovered this plugin and it's functionality seems to fit my use case like a glove however, when I configured it assuming that the "Period" parameter was the "samples in the MA time window", I noticed that the moving avearge was flat (zero) with Period = 30, and then changing the Period to 4 I got the graph below, which is obviously not what I expected.

image

image

image

The thanks to @Gauravshah I realized that the "Period" parameter is in "Days" hence the issue.

So this is a request to change (or add a capability) to the Moving Average graphs to allow the "Time Window" to be specified in "units" (sample periods), e.g. if my graph has a datapoint every 10 seconds, then setting the Time Window to: 30 samples, should apply a 5-minute sliding window for the moving average.

@arigit arigit mentioned this issue Aug 13, 2020
@Gauravshah
Copy link
Member

posting from #104

we added support for timeshiftUnits I think we need to add same for Moving Average that should fix your issue.
https://github.com/GoshPosh/grafana-meta-queries/pull/62/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants