[rrd-users] Trend of Daily Peaks
Karl Fischer
rrd-users at ficos.de
Wed Feb 9 23:17:40 CET 2011
Am 09.02.2011 21:00, schrieb Kyle Brandt:
> If possible I would really like to do it all in the graph.
>
> To define the peak mathematically something like the following would
> be ideal. Break the day into hour blocks and average out of the
> bandwidth usage of the blocks. Then take that result and pick the
> highest value block as the peak value for the day. Lastly, trend
> these values over a larger period of time. This seems like something
> that would be easy to do in the rra originally -- but I want to work
> with existing data.
>
> Does that make sense?
well, somewhat ...
You can break the data timeline into hour blocks by specifying the step,
optionally followed by a consolidation function for data reduction.
So in theory you could be using something like this:
DEF:ds0=sample.rrd:ds0:AVERAGE
DEF:ds0hourly=sample.rrd:ds0:AVERAGE:step=3600:reduce=MAX
you can pick the daily max the exact same way:
DEF:ds0daily=sample.rrd:ds0:AVERAGE:step=86400:reduce=MAX
however, I'm not quite sure if reduce=MAX would work as expected in
combination with the step=3600 or if these values would be averaged?
I guess it's worth a try.
Of course you're better off if you already have the MAX values in rrd.
Then you can use:
DEF:ds0=sample.rrd:ds0:AVERAGE
DEF:ds0hourly=sample.rrd:ds0:MAX:step=3600
DEF:ds0daily=sample.rrd:ds0:MAX:step=86400
Then you can create your trend on the hourly MAXes:
CDEF:ds0trend=ds0hourly,86400,TREND
give it a try and see where you get ...
- Karl
More information about the rrd-users
mailing list