This thread was inspired by the [HOWTO] 0.8.7 and 1 minute polling page, and in particular, tekbot's fantastic post.
Before I begin, I must repeat tekbot's suggestion:
Cacti is an excellent, free product, so I feel the least we can do as users is donate to those who have dedicated so much of their free time in to giving us this software.tekbot wrote:Also, send the developers some love (and / or money). As mentioned in the 0.8.7 release notes, they all have Day Jobs and contribute to Cacti because they WANT TO.
Now, let's begin!
Why the new thread?
There are two reasons for this new thread. The first reason is because I am going to create an updated version of gandalf's excellent tutorial and thought it would be better suited in a new thread rather than tacked on to an existing thread.
The second reason is because I have created a calculator that takes all the hassle out of creating new polling intervals (e.g one minute polling). Rather than tack it on to an existing thread, putting it in a new thread will allow me to track and fix issues, feature requests, etc.
What exactly does the calculator do?
Whether you have configured One Minute Polling before, or you are looking to implement it, you will most probably be familiar with terms such as Data Source Steps, Heartbeats, RRA Steps, Rows and Timespans. Calculating these can be quite difficult (especially for those who are just starting out), and, if you have no idea what they all mean, it can make enabling One Minute Polling very challenging - however, this is where the Calculator comes in. By answering four simple questions the calculator will tell you which values you need to enter in to each of the above mentioned fields and will also estimate the amount of space you will need per Data Source.
Note: Although this calculator was built to simplify the One Minute Polling process, I do urge all readers to understand the process fully. Doing so will ensure that you get the most out of this feature.
Two Part Calculator
The calculator is broken in to two parts. The "Forward" calculator and the "Reverse" calculator. Everything written in the previous section applies to the "Forward" calculator. The "Reverse" calculator allows you to turn "Steps", "Rows" and "Timespans" in to easily understandable information, without having to perform any manual calculations.
Reverse Calculator Examples
When you first install Cacti, all Data Templates have a Step value of 300 and the below RRAs are preconfigured:
Code: Select all
Name Steps Rows Timespan
Hourly (1 Minute Average) 1 500 14400
Daily (5 Minute Average) 1 600 86400
Monthly (2 Hour Average) 24 775 2678400
Weekly (30 Minute Average) 6 700 604800
Yearly (1 Day Average) 288 797 33053184
Let's dissect a few of the above mentioned RRAs:
Code: Select all
Name Steps Rows Timespan
Daily (5 Minute Average) 1 600 86400
The calculator tells us that the Daily (5 Minute Average) does the following:
- * It keeps data for 2 days before overwriting it.
- * It averages data over a 5 minute period.
- * It displays a graph that spans 1 day.
Code: Select all
Name Steps Rows Timespan
Monthly (2 Hour Average) 24 775 2678400
The calculator tells us that the Monthly (2 Hour Average) does the following:
- * It keeps data for just over 2 months before overwriting it.
* It averages data over a 2 hour period.
* It displays a graph that spans 1 month.
Code: Select all
Name Steps Rows Timespan
Yearly (1 Day Average) 288 797 33053184
The calculator tells us that the Yearly (1 Day Average) does the following:
- * It keeps data for just over 2years before overwriting it.
* It averages data over a 1 day period.
* It displays a graph that spans just over a 1 year.
Now that we've seen how the Reverse Calculator works, it should make understanding the Forward Calculator easier.
Below is a list of the One Minute RRAs I wanted to create for myself:
- * Daily (1 Minute Average) - Display a 1 day graph that polls hosts every minute and does not consolidate the data. The data is to be overwritten after 1 week.
* Weekly (5 Minute Average) - Display a 1 week graph that polls hosts every minute and consolidates the data every 5 minutes. The data is to be overwritten after one month.
* Monthly (30 Minute Average) - Display a 1 month graph that polls hosts every minute and consolidates the data every 30 minutes. The data is to be overwritten after three months.
The below example shows how the Daily (1 Minute Average) RRA was configured:
The below example shows how the Weekly (5 Minute Average) RRA was configured:
The below example shows how the Monthly (30 Minute Average) RRA was configured:
Why the long data retention?
A common question I have seen is, "why would you have a longer data retention period than the timespan of the graph?". For example, as mentioned above, one of the RRAs that I wanted was:
- * Daily (1 Minute Average) - Display a 1 day graph that polls hosts every minute and does not consolidate the data. The data is to be overwritten after 1 week.
Using Cacti's "Graph Filters", I can look at any time frame in the past week and view the graphs at a one minute polled interval. If I had not done this, Cacti would have no choice but to display the graphs in my "next best" RRA configuration, which was the Weekly (5 Minute Average) graph. This is not ideal because the data is averaged over 5 minutes, therefore it will effectively have five times less detail than my Daily (1 Minute Average) graphs.
An alternative to Cacti's "Graph Filters" option is its "Zoom Graph" option. Cacti automatically displays graphs using the most detailed graph possible. For example, if a time period is covered by both the Daily (1 Minute Average) and Weekly (5 Minute Average) RRAs, it will present the graph using the Daily (1 Minute Average) RRA.
As per the graphs below, I can zoom in to my "Yearly (1 Day Average)" to the point where the data will be displayed using the Daily (1 Minute Average) RRA.
Fig 1: Zooming in to the "Yearly (1 Day Average)" graph:
Fig 2: After the first zoom, the graph is drawn using the Weekly (5 Minute Average) graph:
Note: The reason why the graph drawing skipped the Monthly (2 Hour Average) RRA is because it had the specified time frame covered by the Weekly (5 Minute Average) RRA, and, as mentioned above, Cacti will always use the RRA which has the most detail in it. If I were to choose a date that was over 1 month ago, the data would not be available in the Weekly (5 Minute Average) RRA (because it only stores data for one month before it is overwritten) and therefore Cacti would use the Monthly (2 Hour Average) RRA instead.
Fig 3: Finally, after zooming in a third time, the graph is drawn using the Daily (1 Minute Average) RRA. You can confirm this is true by counting the amount of times the graphs data changes between two time frames. For example, you can see that the "Inbound" and "Outbound" lines change ten times (once per minute) between 10:50am and 11:am:
HOWTO: One Minute Polling
(Work In Progress).
That's All Folks!
I will update this thread again in the near future to include the above mentioned HOWTO: One Minute Polling section.
Thank you for reading my lengthy post, and I wish you all a Happy New Year!
Please let me know if you find any bugs or have any feature requests.