[hobbit] dbcheck, custom graphs and strange results

Francesco Duranti fduranti at q8.it
Thu Sep 21 11:53:48 CEST 2006


Using DERIVE, if i remember well, the value is also divided by the time
elapsed so for example:
10:24 | 22806 | +41  | 128m    | 3.12

41/300 (5 minutes interval)=0,136 and rrd will report that number to a
understandable unit (m is milli) so it's 0,136*1000=136m.
De difference of the value you get here 128m instead of 136 m should be
beacause rrd will calc the time when he get the data so it's like it got
the new value after 320 seconds instead of 300 (41/0,128 = 320). The
data graphed is something like opens/seconds. The suggestion on the rrd
site is to eventually multiply it and get data/minutes or data/hours
instead of the "pure" absolute value that is not really useful. To do
this you can put a CDEF in the hobbitgraphs 

[mysqlopen]
        DEF:op=mysqlperf.rrd:Opens:AVERAGE
        CDEF:opm=op,60,*
        TITLE MySQL Open / Minutes
        YAXIS open/min
        LINE2:opm#00CCCC:Open/min.
        COMMENT:\n
        GPRINT:slow:LAST: \: %5.1lf (cur)
        GPRINT:slow:MAX: \: %5.1lf (max)
        GPRINT:slow:MIN: \: %5.1lf (min)
        GPRINT:slow:AVERAGE: \: %5.1lf (avg)\n


Just to put the right value in the next version of dbcheck.pl do you
know the kind of the other counter? I'm working with mysql on a test db
so the perf data are not so clear to understand :D If I'm correct they
should be:
Threads			= GAUGE
Questions			= DERIVE
Slow queries		= DERIVE
Opens				= DERIVE
Flush tables		= DERIVE
Open tables			= GAUGE
Queries per second avg	= GAUGE

Is this correct?


This is the explanation on the rrd create from the website...

It's always a Rate
    RRDtool stores rates in amount/second for COUNTER, DERIVE and
ABSOLUTE data. When you plot the data, you will get on the y axis
amount/second which you might be tempted to convert to an absolute
amount by multiplying by the delta-time between the points. RRDtool
plots continuous data, and as such is not appropriate for plotting
absolute amounts as for example ``total bytes'' sent and received in a
router. What you probably want is plot rates that you can scale to
bytes/hour, for example, or plot absolute amounts with another tool that
draws bar-plots, where the delta-time is clear on the plot for each
point (such that when you read the graph you see for example GB on the y
axis, days on the x axis and one bar for each day).


Francesco


> 
> Hello,
> 
> I am trying to graph the value of the "Opens" value produced 
> by dbcheck when monitoring mysql.
> 
> I defined the value as DERIVE in NCV_mysql instead of GAUGE, 
> as this is a value that is growing while the mysql instance 
> is running (if the mysql instance restart it restarts from 0).
> 
> For instance, I have the following:
> 
> time  | Opens | diff | graph'd | diff/graph'd
>        | value | t'-t | value   | value
> ------+-------+------+---------+-------------
> 10:14 | 22732 |  -   |  -      |   -
> 10:19 | 22765 | +33  | 110m    | 3.33
> 10:24 | 22806 | +41  | 128m    | 3.12
> 10:29 | 22821 | +15  | 50m     | 3.33
> 10:34 | 22835 | +14  | 48m     | 3.2
> 
> I was expecting the graphed value to be equal to the diff 
> value, but the units are wrong (m instead of unit), and the 
> value is wrong as well (with a somewhat constant 3.xx ratio).
> 
> Any idea where this comes from? (I suspect this is me being 
> stupid and not understanding some of the underlying rrd subtleties)
> 
> Cheers,
> Gildas
> 
> To unsubscribe from the hobbit list, send an e-mail to 
> hobbit-unsubscribe at hswn.dk
> 
> 
> 



More information about the Xymon mailing list