I have a counter that measures the number items sold every 10 minutes. I currently use this to track the cumulative number of items:
alias(integral(app.items_sold), 'Today')
And it looks like this:
Now, what I want to do to show how well we were are doing TODAY vs best, avg (or may median) worst day we've had for the past say 90 days. I tried something like this:
alias(integral(maxSeries(timeStack(app.items_sold, '1d', 0, 90))),'Max')
alias(integral(averageSeries(timeStack(app.items_sold, '1d', 0,90))), 'Avg')
alias(integral(minSeries(timeStack(app.items_sold, '1d',0, 90))), 'Min')
which looks great but actually shows me the cumulative amount of all the max, avg and min for all series interval.
Can anyone suggest a way to achieve what I'm looking for? i.e. determine what the best (and worst and median) day was for the past 90 days and plot that. Can it be done using purely Graphite functions?
Thanks.
The answer was to just flip the order to the function calls: (maxSeries before integral)
Thanks to turner on the [email protected] board for the answer
alias(maxSeries(integral(timeStack(app.items_sold, '1d', 0, 90))),'Max')
alias(averageSeries(integral(timeStack(app.items_sold, '1d', 0,90))), 'Avg')
alias(minSeries(integral(timeStack(app.items_sold, '1d',0, 90))), 'Min')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With