Maybe you were diligent and DID put maximum or minimum values, but they were wrong!
Maybe you downloaded a template pack and the min/max values were set, but too high/low for your environment!
In the past you had 2 options after updating the data template to match your desired settings:
- Find all the RRDs associated with that template and manually run 'rrdtool tune' to change the min/max values
- Delete all your data sources and graphs based on this template and re-create them, loosing all your historical data.
I present for use by the Cacti Community the RRD mass tuning Command-line tool!
Put this file in your 'cli' directory, change the extention to 'php' and tune away your data source blues. This script takes a data template ID and optionally a host/device ID and passes rrdtool whatever options you specify, allowing you to mass tune all the RRDs for a particular data template.
For example, I created a template for SQL Server's table scan stats some time ago, but since then our servers have undergone a massive increase in load thanks to SharePoint. Naturally, we have a large number of SQL Servers and therefore a large number of data sources based on this data template.
If I were to try and update all these data sources, I'd have to go in to each one and find the full path to the RRD file, copy it to my command prompt window and type out the command manually. This isn't so bad if you only have 2-3 graphs of a given type, but what if you had 100 or 1000! it could take AGES to do and you might miss one.
With this new script, you can just run:
Code: Select all
php -q tune_data_source_rrds.php --data-template-id=123 -- -a mssql_index_srchs:400000
I've tried this on my server and it seems to work great for my needs, but I'd like a few people out in the community to try it on their environments and see what kind of results they get.
If you have questions, comments or recommendations, I'd love to hear them.
Thanks!