Xaprb

Stay curious!

Archive for the ‘monitoring’ tag

MySQL Cacti templates 1.0.0 released

with 3 comments

I just uploaded the 1.0.0 release of my MySQL templates for Cacti. Now there’s an actual download under the Downloads tab. I solved a number of issues in this release. The changelog:

2008-06-01: version 1.0.0

	* Fixed when SHOW MASTER LOGS has no File_size column.
	* Fixed Cacti-version-specific problems with include files.
	* Fixed when binary log is not enabled.
	* Fixed some caching issues.
	* Fixed make-template.pl issues when downloaded from SVN.
	* Replication graph shows only slave_lag instead of Seconds_behind_master
	* Generate a version for Cacti 0.8.6i.
	* Support generating custom versions with make-template.pl.

Written by Xaprb

June 1st, 2008 at 12:52 am

Posted in SQL,Sys Admin

Tagged with , ,

Screenshots of improved MySQL Cacti templates

with 16 comments

I finally have some images to show you what my improved Cacti templates look like.

These aren’t a perfect demo, since for example this server doesn’t have the query cache enabled, but it should show you what I’ve done. Note, for example, that each graph is labeled with the actual values of the images drawn on it. You don’t have to guess what the values are by squinting at the graphs.

You can click on any image to go to a larger version. Enjoy:

InnoDB Buffer Pool Activity InnoDB Buffer Pool InnoDB I/O InnoDB I/O Pending InnoDB Insert Buffer InnoDB Log InnoDB Row Operations InnoDB Semaphores InnoDB Transactions MyISAM Indexes MySQL Binary/Relay Logs MySQL Command Counters MySQL Connections MySQL Files and Tables MySQL Network Traffic MySQL Query Cache MySQL Query Cache Memory MySQL Replication MySQL Select Types MySQL Sorts MySQL Table Locks MySQL Temporary Objects

Enjoy!

Written by Xaprb

May 25th, 2008 at 2:10 pm

Improved Cacti monitoring templates for MySQL

with 10 comments

Download MySQL Cacti templates

As promised, I’ve created some improved software for monitoring MySQL via Cacti. I began using the de facto MySQL Cacti templates a while ago, but found some things I needed to improve about them. As time passed, I rewrote everything from scratch. The resulting templates are much improved.

You can grab the templates by browsing the source repository on the project’s homepage.

In no particular order, here are some things I improved:

  • Standard polling interval and graph size by default.
  • Full captions on every graph; you don’t have to guess at how big the values are. Each graph has current, max, and average values printed at the bottom for every value on it.
  • Much more data is captured. I’ve graphed almost everything I could think of.
  • The graphs are grouped better. Most graphs have only related values. There are some exceptions, but not many.
  • The templates don’t hijack your existing installation. They don’t depend on or alter anything in your default Cacti installation.
  • The script that gathers the data is totally rewritten from scratch, and much improved. For example, the math works on 32-bit systems. It has caching built-in so each poll cycle results in just one request to the server, instead of one request per graph. (This is a weakness of Cacti I’m trying to work around). It also has debugging aids and other good coding stuff.
  • By default, it assumes you have the same username and password across every server you’re monitoring, so you don’t have to fill in a username and password for every single graph you create.
  • One data template == one graph template. This helps work around another Cacti limitation.
  • Lots more. Honestly I can’t really remember everything I’ve done. I’m sure you’ll help me remember by asking me how to get X feature working the way you want, and I’ll go “oh, yeah, that’s another thing I improved…”

Cacti templates are very laborious to create if they’re complex at all; it takes a long time and is very error-prone. Instead of doing it through Cacti’s web interface and exporting a huge XML file, I eliminated the redundancies and created a small, easy-to-maintain file from which I generate the XML template with a Perl script. This gives the added benefit of letting me (or you) generate templates with different parameters such as polling interval or graph size. The README file has the full details. However, I’ve pre-generated a set of templates that matches Cacti’s defaults, so you can probably just use that.

This has taken a lot of time. In particular, I spent a lot of time working on it at my former employer, The Rimm-Kaufman Group (kudos to them for letting me open-source the work) and I just spent most of my weekend writing the scripts to convert from the compact format to XML templates, so it’s possible to maintain these beasts. Plus I had to develop the compact format, too. This took a lot of time because I had to understand the Cacti data model, which is pretty complex.

Please enter issue reports for bugs, feature requests, etc at the Google project homepage, not in the comments of this blog post. I do not look through comments on my blog when I’m trying to remember what I should be working on for a software project.

If these templates help you and you feel like visiting my Amazon.com wishlist and sending something my way, I’d appreciate it!

PS: You may also be interested in Alexey Kovyrin’s list of templates for monitoring servers.

Written by Xaprb

April 27th, 2008 at 8:43 pm