Having the ability to configure cacti for 1 minute polling is great if you need a much higher resolution on monitoring certain devices in your network. Whats even more better is we can do this without the need of additional plugins or patches. We just need to install the the later version of cacti (version .8.7 and above) and we’re good to go.
One recommendation before doing this is to have a good deal of knowledge about RRAs or Round Robin Archives. RRAs are widely used by most monitoring systems, including cacti, basically any servers that uses rrdtool as their graphing mechanism. Here’s a good RRA discussion to start with.
DISCLAMER: All the information provided in here are for education and testing purposes only. Make sure you know what you are doing and have done enough tests to implement this in a production environment. Use at your own risk.
To start off, we need to create our own “custom” RRAs and use those for our 1 minute poll settings:
Open your cacti administration page. The go to Console->Data Sources->RRAs :
You can see I already have a bunch of custom RRAs that was configured to poll in 1 minute.
All the custom RRAs have a name suffix of “@ 1 Minute Polling”.
The following are my custom RRA settings. You can use it and maybe adjut some settings to make it work with you.
Custom RRAs for 1 minute polling: Hourly (1 Minute Average) - 6H View @ 1 Minute Polling Steps - 1 Rows - 4320 (Hold the data for 3 days before overwriting a new data) Timespan - 21600 (6-hours span of viewing the graphs) Daily (5 Minute Average) - 24H View @ 1 Minute Polling Steps - 5 Rows - 10080 (Hold the data for 7 days before overwriting a new data) Timespan - 86400 (24-hours/1-day span of viewing the graphs) Weekly (30 Minute Average) - 7D View @ 1 Minute Polling Steps - 30 Rows - 21600 (Hold the data for 15 days before overwriting a new data) Timespan - 604800 (7-day span of viewing the graphs) Monthly (2 Hour Average) - 1M View @ 1 Minute Polling Steps - 120 Rows - 89280 (Hold the data for 62 days before overwriting a new data) Timespan - 2678400 (31-day span of viewing the graphs) Yearly (12 Hour Average) - 1Y View @ 1 Minute Polling Steps - 720 Rows - 1051200 (Hold the data for 2 years before overwriting a new data) Timespan - 31536000 (365-day span of viewing the graphs)
Again, the settings are pretty much straightforward but you happen to have some trouble understanding some of the settings, you should try to visit this thread before continuing, as understanding how RRAs work is crucial with regards about this topic.
Now we want to set our polling interval to 1 minute. Note that I am running cacti at a faster dedicated machine and have the resources that it needs for 1 minute polling. Setting the poller interval to 1 minute might give some slight performance impact especially if you are monitoring a huge number of devices in your network. Fortunately, I found out the we can still leave the default setting of “5 minute” for the poller interval and it would still work. So it doesn’t really matter if you configure your poller in 1 minute or 5 minute interval.
Go to Settings->Poller->Poller Interval :
Next, we now have to create new “Data Templates” and configure it to use our own custom RRAs. We also need to set the “Step” value to 60, and the “Hearbeat” to 120. We need to do this or else it won’t work. Again, check this thread for more info about “Step” and “Heartbeat” settings.
A very good tip is to avoid creating new data templates from scratch, instead you can just clone a data template of your choice from the defaults and edit the settings to make it work at 1 minute polling resolution.
For this guide, we will just clone the “Interface – Traffic” data template and renamed it to “Interface – Traffic (1-min)” and adjust the settings:
Be sure to select our own custom RRAs in the associated RRAs field. Define a new name “Internal Data Source Name” for this data template as we will need it in the next step for setting the graph templates.
Now we need to make a new graph templates and set it to use the cloned data templates that we made on the previous step.
Again, try not to create a graph template from scratch rather just make a clone from the default templates on the list. We will use the “Interface – Traffic (bits/sec)” graph template and make a clone out of it then renamed it to “Interface – Traffic (bits/sec) (1-min)” and adjust its settings:
We’re almost done. Last thing we want to do is clear the poller cache the refresh the host and data sources with the cache.
Go to System Utilities->Poller Cache Administration->Rebuild Poller Cache :
We can now bind our cloned graph template to a device for 1 minute polling resolution.
We can see the difference between a 5-minute vs 1-minute polling on the following image:
NOTE:
Don’t attempt to change the value of the default cron interval of 5 minutes. Changing it to other values might cause some gaps on your graphs.
As of this writing, you need to delete the old data sources that uses 5-minute polling interval as the sources are not compatible to 1-minute polling. Delete the old data sources and create a new set of graph for your devices to use 1 minute polling.
And lastly, don’t forget to check your log file and look for any errors. Visit the cacti forum and post your questions there. You can also post your question on the comments and I will try my best to answer it.












No comments yet.