MySQL Cacti templates version 1.1.1 released
I’ve released version 1.1.1 of the MySQL Cacti templates I develop. The new templates work around more Cacti limitations, including the limitation on the length of the data returned from the poller script. There’s also a new graph and many other niceties since the last release.
Note that there are TWO incompatible changes with the previous version of the templates. You don’t have to throw away your RRA files, you just have to delete and re-import over all the existing templates. It’s not my fault, there was no other way to work around the limitations mentioned above. Really. Have fun upgrading!
Version 1.1.1 is actually just a repackaging of 1.1.0.
The changelog follows.
2008-10-15: version 1.1.1 * The tarball didn't have make-template.pl mysql_definitions.pl (issue 34) 2008-10-14: version 1.1.0 * Graphs fetched too much data, causing errors (incompatible; issue 28, 23). * Output of the poller script is compressed with short value names. * Checks can be disabled; no need to fetch INNODB STATUS if unwanted. * Queries could cause a MySQL thread stack overflow (issue 19). * Older PHP didn't have array_change_key_case function (issue 21). * The PROCESS privilege is required for MySQL 5.1.29 with InnoDB (issue 22). * Added an aggregated view of SHOW PROCESSLIST; requires PROCESS privilege. * The text on the graph could overflow the right-hand edge. * Truncated SHOW INNODB STATUS could cause an SQL error (issue 27). * The poller script requires proper cmdline options (incompatible change).

I got cacti devs to increase the buffer size a bit in the poller a while back, I guess it wasn’t enough(since you’re also pulling show innnodb status? I only took global variables and status).
http://bugs.cacti.net/view.php?id=512
I used some factoring in my graph templates, for example the table lock graphs where data source values range from being in the 100s-1000s to small micro or milli values.
Awesome template pack, much more finalized than my own, so I’m ditching mine now :)
Mikael Fridh
16 Oct 08 at 9:45 am
Thanks Mikael. Yeah, a lot of people are stuck on old versions, and for it to be most useful, it ought to just work on old versions. Now the script fetches all data, caches it in a file, and then returns the desired stuff; subsequent calls just fetch from the cache file. The command-line that passes the desired keys to the script is built into the templates, so each graph has its own data template (which maps directly to an RRA) and each data template has its own data source. It’s ugly conceptually, but simple in practice because it’s all built from a description of the whole thing in the meta-files.
Xaprb
16 Oct 08 at 1:08 pm
Hello there Micke,
we are still using you graphs here =)
But trying to implement yours Xaprb.
However some issues are showing. We are having problem with the poll time, when adding the graphs to about 16 instances, the poll time increases dramatically, and the poll of the mysql graphs are running extremely slow.
It this something you have experienced?
I’m using cacti 0.8.7b and spine 0.8.7a on rhel 5.
Jens Niia
17 Oct 08 at 4:24 am
Jens, I haven’t seen that. Can you figure out why it’s happening?
Xaprb
17 Oct 08 at 8:52 am
I know you’re not big on support via blog, but I keep getting a blank page on templates_import.php trying to get this new one imported. Running Cacti 0.8.7.b. Any idea? Cacti forums have turned up bumpkus so far.
Matt
19 Oct 08 at 5:20 pm
You must be punished for using the blog comments for support! But seriously, I have been developing on the same version in a virtual machine on CentOS and had no troubles. Try a fresh, blank install. Try checking out the log files. Try fixing Cacti’s code so it actually has helpful log files. If that doesn’t work, go slam a bug report into the Google Code project :)
I have heard at least one other report of trouble importing the templates, so I’m sure you’re not alone.
Xaprb
20 Oct 08 at 10:19 am
Heh, sadly this was a fresh blank install; was moving to a new box. I ended up just moving the db over and sticking with the old version of the templates. Some days I love Cacti, most days I hate it.
Thanks again for the great templates.
Matt
20 Oct 08 at 11:00 am
Ok, it’s working fine but I’m only graphing 3 servers so far.
Indeed I can see performance is worse than the old templates/script because Barons templates will execute 24 scripts per host instead of 1.
But aside from that there’s one graph I feel is missing so far;
A graph of all the Handler statistics: Handler_read_*, Handler_commit, Handler_rollback etc.
Mikael Fridh
12 Nov 08 at 9:43 am
Mikael, my script should execute once per polling cycle per host, that is one of the design elements I spent a lot of time on. Are you sure the caching is working right? If not please put a bug report on the Google Code project. The point of my design is to work around Cacti’s limitations here: http://forums.cacti.net/viewtopic.php?t=26448#130332 Cacti’s design forces a tradeoff among various complaints, and caching results is the only good way around it right now.
As for Handler_* stats, I have no clue why I omitted those! Please submit a bug report on that.
Xaprb
12 Nov 08 at 10:10 am
Mikael, it would be great to have another commiter on the code project, so if you want SVN access just ask.
Xaprb
12 Nov 08 at 10:13 am
Yeah but the poller still executes ss_get_mysql_stats.php 24 times.
100 database servers with my old templates = 100 script executions.
100 database servers with MySQL Cacti templates = 2400 script executions.
Indeed, Cacti’s design is not optimal, and the lack of a decent polling/caching API is plagueing it.
I still think getting people to increase their fgets() sizes and doing all the polling in one call is optimal :). It just sucks that when you add graphs etc, you sometime get duplicated data sources. *grr*
I can perhaps commit to looking at some of the code december 1, after my vacation. Thanks for your great work so far :)
Mikael Fridh
13 Nov 08 at 1:24 pm
Trying to create custom template and I am getting a XML Parse error. I am using version 0.8.7b and when i choose –cactiver it does not allow me to use 0.8.7b. It only shows and allows up to 0.8.6j. Any suggestions?
John
10 Dec 08 at 5:34 pm
John, please submit a bug on the Google Code project. The templates should import fine on newer versions if you generate them for an older version, but if that isn’t the case, submit a bug for that too.
Xaprb
11 Dec 08 at 11:17 am