[hobbit] MySQL graphing woes
Dominique Frise
Dominique.Frise at unil.ch
Thu Apr 12 07:30:55 CEST 2007
Charles Jones wrote:
> I'm setting up mysql checks and graphing using the hobbit-modified
> bb-mysql.pl. I have the statuses working fine:
>
>
> Thu Apr 12 04:42:40 2007 MySQL Server OK
>
> threads: 10
> questions: 2751997
> slow queries: 2100
> opens: 304
> flush tables: 3
> open tables: 100
> queries per second avg: 8.514
> maxcon: 400
>
> Server version: 4.1.9-standard-log
> Uptime: 3 days 17 hours 47 min 3 sec
>
> Server reports timestamp of 2007-04-12 04:42:40
>
>
> However, instead of a graph at the bottom, I just have:
> "hobbit graph ncv:mysql" next to the hourglass. I'm using Hobbit 4.20
> plus the latest "all in one" patch.
>
> Here are the relevant sections from my config files, hopefully someone
> can point out what I'm doing wrong?
> hobbitserver.cfg:
> TEST2RRD="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperature,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,files,procs=processes,ports,clock,lines,mysql=ncv"
> GRAPHS="la,disk,inode,qtree,files,processes,memory,users,vmstat,iostat,tcp.http,tcp,ncv,netstat,ifstat,mrtg::1,ports,temperature,ntpstat,apache,bind,sendmail,mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,clock,lines,mysql:mysqlslow,mysql:mysqlthread"
> NCV_mysql="*:GAUGE"
>
> hobbitgraph.cfg (these are the default entries that come with Hobbit):
> [mysqlslow]
> DEF:slow=mysql.rrd:Slowqueries:AVERAGE
> TITLE MySQL Slow Queries
> YAXIS #
> LINE2:slow#00CCCC:Slow Queries
> 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
>
> [mysqlthread]
> DEF:threads=mysql.rrd:Threads:AVERAGE
> TITLE MySQL Active Threads
> YAXIS #
> AREA:threads#00CCCC:Threads
> COMMENT:\n
> GPRINT:threads:LAST: \: %5.1lf (cur)
> GPRINT:threads:MAX: \: %5.1lf (max)
> GPRINT:threads:MIN: \: %5.1lf (min)
> GPRINT:threads:AVERAGE: \: %5.1lf (avg)\n
>
> Note I have also dumped out one of the rrd files, and they have data, so
> I don't think the problem lies with my NCV definition:
> /$ rrdtool dump mysql.rrd |egrep 'name|value' | head -20/
> <name> threads </name>
> <value> 2.6730000000e+03 </value>
> <name> questions </name>
> <value> 8.1735172200e+08 </value>
> <name> slowqueries </name>
> <value> 6.2488800000e+05 </value>
> <name> opens </name>
> <value> 9.0288000000e+04 </value>
> <name> flushtables </name>
> <value> 8.9100000000e+02 </value>
> <name> opentables </name>
> <value> 2.9700000000e+04 </value>
> <name> queriespersecondavg </name>
> <value> 2.5239060000e+03 </value>
> <name> maxcon </name>
> <value> 1.1880000000e+05 </value>
> <name> Uptime </name>
> <value> 8.9100000000e+02 </value>
> <name> Serverreportstimest </name>
> <value> 1.5444000000e+04 </value>
>
> So there we have it...the data is getting to Hobbit and being stored in
> the rrd files, it's just not displaying the graphs for some reason, and
> at the moment I can't see why. I searched the email archive and found
> lots of other posts of people having similar problems, with various
> solutions, none of which seem to work (yes I restart Hobbit after
> editing hobbitserver.cfg).
Your GRAPHS variable should be:
GRAPHS="la,disk,inode,qtree,files,processes,memory,users,vmstat,iostat,tcp.http,tcp,ncv,netstat,ifstat,mrtg::1,ports,temperature,ntpstat,apache,bind,sendmail,mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,clock,lines,mysql"
In bb-hosts set the TRENDS directive for the host(s) like this:
TRENDS:*,mysql:mysqlslow|mysqlthreads
Dominique
UNIL - University of Lausanne
More information about the Xymon
mailing list