Archive for the ‘Cacti’ Category
I’ve released version 1.1.8 of the Better Cacti Templates project. This release includes a bunch of bug fixes and several important new graphs. There are graphs for the new response-time statistics exposed in Percona Server, and a new set of graphs for MongoDB.
There are upgrade instructions on the project wiki for this and all releases. There is also a comprehensive tutorial on how to create your own graphs and templates with this project. Use the project issue tracker (not the comments on this post!) to view and report issues, and use the project mailing list to discuss the templates and scripts.
The full changelog follows.
2011-01-22: version 1.1.8 * The cache file names could conflict due to omitting --port (issue 171). * Load-average parsing did not work correctly at high load (issue 170). * The --mpds option to make-template.pl did not create new inputs (issue 133). * The url and port were reversed in the Nginx commandline (issue 149). * Added $nc_cmd to ss_get_by_ssh.php (issue 154, issue 152). * InnoDB Transactions and other graphs showed NaN instead of 0 (issue 159). * Added graphs for Percona Server response-time distribution (issue 158). * Added graphs for MongoDB (issue 136). * Added a minimum option to the template construction logic (issue 169). * Added memtotal for Memory (issue 146). * make-template.pl sanity checks were too strict (issue 168).
The traditional way to build Cacti templates is through the Cacti web interface. This is an enormous amount of work, and the result is generally not very consistent or good quality. The process is too error-prone. You can export the templates as XML, but they tend to have problems such as version incompatibilities with other Cacti installations, and it’s hard to adapt them for user preferences such as different graph image sizes and polling intervals.
The way I build Cacti templates is exactly the opposite. I create a data structure in a file, which looks like many configuration file syntaxes you’ve probably worked with. It represents the graphs, templates, scripts, and so on. From this, a tool generates the XML template file, which is a universal template definition, and is a breeze to import into Cacti. It is completely consistent and has zero cruft in it. This process prevents errors, and the results are perfect every time. (There’s a test suite, by the way.)
All the tools, documentation, how-tos, examples, and pre-fabricated scripts and templates you need are at the Better Cacti Templates open-source project. If you want to build your own templates, pay special attention to the documentation on creating graphs.