linux at thehobsons.co.uk
Tue Aug 11 23:29:55 CEST 2015
Devante Vargas <devantev at gmail.com> wrote:
> I am working on creating a graph for my ping script. It collects, min, max and average response times. I have added the ::STACK for the AREA after the first AREA is defined. Problem is it adds the next two on top and moves it up a notch, e.g. Min response time is 0.42 (this is measured accurately and on the Y axis it shows it hits 0.42ms) but the next 2, e.g max response times, 0.64ms, it places it on top of the min area and when aligned with the Y axis it shows at 1.08ms, and then average, 0.60ms on top of that and shows aligned at the value of 1.68ms.
> Is there anyway to get the max and average to start at zero instead of from where the last area ended up at?
Several ways to do this, depending on what you want.
One would be to plot an area for max, then an area for avg, then an area in white for min - no stack involved. So you end up with a colour band from min to avg, and a different colour band from avg to max.
Another one I've used is : use a CDEF to get the difference between max and min, plot min in white (or transparent), then stack the CDEF on top of that, then draw a line for avg. I tend to use a solid colour for the line, and the same colour (but with a lot of transparency) for the min-max spread - that way the min-max spread area doesn't obliterate what's been plotted before.
More information about the rrd-users