[hobbit] mysql graphing ---it should not be this hard

Tom Georgoulias tomg at mcclatchyinteractive.com
Wed May 24 22:23:11 CEST 2006


Tom Georgoulias wrote:
> Hi,
> 
> I've been attempting to get the bb-mysqlstat.sh script from deadcat.net 
> to collect mysql status data from a DB client, using the Hobbit NCV 
> module, and I'm stuck. I can't believe how hard such a seemingly simple 
> task ended up being, and I'm still don't have it working right.

Well, writing that email must've helped me get my thoughts straight, 
because I have it working now.

> - I have the bb-mysqlstat.sh script running on the client and the status 
> reports are being displayed under the "mysql" column.  No graphs yet, 
> just a link for one named "hobbit graph ncv:mysql"

Fixed after I created a mysql graph def for queries/second and named it 
[mysql].

> - I've added "mysql:mysqlslow,mysqlthread: to my GRAPHS:* entry in 
> bb-hosts.

This is wrong.  Should've been mysql:mysqlslow|mysqlthread

> The NCV_mysql="Uptime:NONE,Queriespersecondavg:GAUGE" instructs hobbit 
> to drop the uptime value, which it does, but I'm also missing 
> Queriespersecondavg.  In addition, it appears that the data in the rrd 
> file for each of the variables is incorrect.  If I had to guess, I 
> suspect the NCV module is either mangling it because of the data format, 
> or that the status report is sent in by the bb-mysqlstat.sh script is on 
> a single line (instead of using newline characters after each value). 
> I've search the mailing list archives and no one has mentioned changing 
> the script output format.

I went ahead and modified the client side script to use a newline after 
each name:value pair, and changed my to:
NCV_mysql="Uptime:GAUGE,Threads:GAUGE,Questions:GAUGE,Slowqueries:GAUGE,Opens:GAUGE,Flushtables:GAUGE,Opentables:GAUGE,Queriespersecondavg:GAUGE"

With these changes in place, removing the old mysql.rrd file, and a 
restart of of hobbit, graphs are working now.  If anyone sees a 
potential problem with what I did in NCV_mysql, let me know before I 
gather too much inaccurate data in my rrd file!  :)

Tom



More information about the Xymon mailing list