[rrd-users] Getting an overview of many statistics...

Simon Hobson linux at thehobsons.co.uk
Fri May 29 13:07:53 CEST 2015


Peter Valdemar Mørch <peter at morch.com> wrote:

> Looking at average and standard deviation is a possibility, but most of my users (and I) really have no good intuitive feeling for what standard deviation really "means".

+1, I don't either

> I've seen that smokeping does something interesting, see e.g.
> 
> http://oss.oetiker.ch/smokeping-demo/img/Customers/OP/james~octopus_last_10800.png
> 
> The "historgram" approach where darker grey implies more datapoints in this "region" could be cool. This gives the overview. Have no idea how this is accomplished, though.

I'm not sure "dark = more" in the way you are expecting. I suspect it's more a case of shading ranges - so the central range (say the range that contains from 40% to 60% of the results when sorted by time) is drawn dark, the ranges either side of that are drawn lighter, and so on until the outmost ranges (eg from smallest to say 10% and 90% to largest) are drawn in light grey. Finally the median is drawn as a line - who's colour indicates packet loss.

The areas can be drawn three ways. Lets assume we have 11 values, representing the ping times for the fastest (t0), the 10th decile (t1), through to the slowest (t10).

We can draw t0 to t10 in very light grey, then overlay t1 to t9 in less light grey, t2 - t8, t3 - t7, and finally overlay t4 to t6 in dark grey/black.
Or we can draw t0 to t1, stack t1 to t2, stack t2 to t3, t4 - t4, t4- t6, t6-t7, t7-t8, t8-t9, and finally t9-t10.
Or we can draw 0-t10 in light grey, then draw 0-t9 in darker grey, and so on until you've drawn 0-t1 in light grey. Then draw 0-t0 in white to "erase" the bit between axis and lowest value.

Neither is right or wrong - personally I'd do it the first way, which would be (from memory) something like :
DEF:t010=t10,t0,-
DEF:t19=t9,t1,-
...
AREA:t0#FFFFFF00  <- *
AREA:t010#202020:STACK
AREA:t1#FFFFFF00  <- *
AREA:t19#404040:STACK
...
* Note that I've used full transparency to draw "nothing" from the axis up to the bottom of each range.


Then you need to draw the line, and again you need to generate bands and then draw several overlays. Again there is more than one way :
You can draw the line, in each colour, only where that colour is needed; or you can draw the line in each colour, overlaying each colour on top of the previous one.
Eg, you could draw a red line all the way, then draw the light blue line only where packet loss <19/20, and so on until you draw the green line only where loss=0. Or you can draw the red line only where loss >=19/20, the light blue line only where loss >=10/20 and <19/20, and so on. The line itself is drawn at the median value (t5 - bet you were wondering where that had gone !)
Something like this :
LINE:t5#FF0000
DEF:l10=loss,19,lt,t5,unkn,if
LINE:t5#0000FF
...
Which means, draw t5 in red, then calculate l10 which equals t5 where loss <19 otherwise it's set to unknown, then draw that in blue. Where L10 is unknown, then the line is not drawn and the red line shows through.
Repeat for the other steps.

So it's not actually all that hard to draw.



"Alex van den Bogaerdt" <alex at vandenbogaerdt.nl> wrote:

> I would generate a number of squares, showing either green, amber or red.

Just be aware that those colours are the ones that are affected by the most common form of colour blindness (red-green deficiency), which affects about 1 in 7 males ! Many "red/amber/green" graphs are almost invisible to me (it depends on the area, the specific colours used, the display, ambient light, etc) and with some of them I really cannot see a change between the colour sections without blowing the screen up to make the areas larger.
A good example is the Unify software from Ubiquiti, where on one page, it shows a "health" bar for each access point showing "red" where there is a lot of competing traffic and packet loss and green for "good". The bars are thin, and it was a while before I even realised that there was a red section on some of them !



More information about the rrd-users mailing list