[hobbit] dbcheck, custom graphs and strange results

Gildas Le Nadan gn1 at sanger.ac.uk
Thu Sep 21 13:14:36 CEST 2006


Thanks for your answer Francesco, it is graphing the correct values now.

Francesco Duranti wrote:
> 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).

Hum, it is more likely because the values were read "on the graph" :)

> 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

Well actually, I renamed the test mysql after your message on 
sourceforge, and the "Opens" value was added to the mysqlslow graph (I 
shall renamed it otherwise).

So here is my working mysqlslow definition in hobbitgraph.cfg

[mysqlslow]
         DEF:slow=mysql.rrd:Slowqueries:AVERAGE
         DEF:open=mysql.rrd:Opens:AVERAGE
         CDEF:slowm=slow,60,*
         CDEF:openm=open,60,*
         TITLE MySQL Slow Queries & Opens / min
         YAXIS #
         LINE2:slowm#000000:Slow Queries / min
         GPRINT:slowm:LAST: \: %5.1lf (cur)
         GPRINT:slowm:MAX: \: %5.1lf (max)
         GPRINT:slowm:MIN: \: %5.1lf (min)
         GPRINT:slowm:AVERAGE: \: %5.1lf (avg)\n
         LINE2:openm#FF0000:Open / min
         GPRINT:openm:LAST: \: %5.1lf (cur)
         GPRINT:openm:MAX: \: %5.1lf (max)
         GPRINT:openm:MIN: \: %5.1lf (min)
         GPRINT:openm: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?

As far as I know, yes (this is what I have defined anyway).

BTW, I have 2 requests concerning dbcheck.pl

- Firstly, would it be possible to deactivate the test for oraclehome 
being a valid directory if no oracle test is set?

- A nice feature would be to monitor the process list on the mysql 
server (http://dev.mysql.com/doc/refman/5.0/en/show-processlist.html)

As it may be quite long on an active server, it is probably better to 
consolidate them by category (i-e # of process in the "Sleeping" state, 
in the "Sending data" state and so on)

Cheers,
Gildas



More information about the Xymon mailing list