Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cacti 0.8 Beginner's Guide

You're reading from   Cacti 0.8 Beginner's Guide Learn Cacti and design a robust Network Operations Center

Arrow left icon
Product type Paperback
Published in Mar 2011
Publisher Packt
ISBN-13 9781849513920
Length 348 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Thomas Urban Thomas Urban
Author Profile Icon Thomas Urban
Thomas Urban
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Cacti 0.8Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Installing Cacti FREE CHAPTER 2. Using Graphs to Monitor Networks and Devices 3. Creating and Using Templates 4. User Management 5. Data Management 6. Cacti Maintenance 7. Network and Server Monitoring 8. Plugin Architecture 9. Plugins 10. Threshold Monitoring with Thold 11. Enterprise Reporting 12. Cacti Automation for NOC Mobile Access / Administration Online Resources Further Information Pop Quiz Answers
Index

The Round Robin Database Tool


Cacti uses RRDtool to store and graph its performance data. RRD files store data in a fixed size file using a First In, First Out (FIFO) methodology and in order to aggregate data, different Round Robin Archives (RRA) are defined within a single RRD file. These RRAs usually consist of daily, weekly, monthly, and yearly archives but can be freely defined.

The RRD file architecture

The principle of an RRD file is shown in the next figure. We have defined three Round Robin Archives—one storing 5 minute polling data, one storing 20 minutes (4 * 5 minute polling data) aggregated data, and another storing hourly (12 * 5 minute polling data) aggregated data.

In this example, the data step is defined as 5 minutes (300 seconds) so updates to the RRD file should happen every 5 minutes. During each update, the data is being written to the first archive. After 20 minutes have passed, the first data set is aggregated and written to the second archive so that it contains an overall view of the 20-minute period. Once a full hour has passed, the first data set is once again aggregated and written to the hourly archive, providing a broader view.

Each RRA is limited to a specific amount of data points, after which the data that has been written first will be overwritten by the newest data. This methodology ensures that the RRD files do not grow in size beyond their initial state. The disadvantage of this is the loss of detailed data once the RRA overwrites it:

Let's take the example and look at the corresponding rrdtool command:

rrdtool create test.rrd --step 300 \
DS:data:GAUGE:600:U:U            \
RRA:AVERAGE:0.5:1:16               \
RRA:AVERAGE:0.5:4:16               \
RRA:AVERAGE:0.5:12:16

The --step flag sets the heartbeat in which data is supposed to come in. In the example it is 5 minutes (300 seconds), which is the default for RRD files. This file contains one data source (DS) called data, which is defined as a gauge. Since we don't want to limit the data entering the archive based on a minimum or maximum value, it is set to U. The 600 defined here is the time in seconds allowed to pass between two updates before the specific data point is set to unknown.

The file contains three round RRAs. The first one stores 16 data points, so a total of 80 minutes of data is stored.

The second archive stores 16 data points, which are each an aggregated average of the last four data polls. This gives a total amount of 320 minutes, or five hours. This also means that this archive has already lost some detailed information as each data point in it only represents a 20-minute timeslot, but we can view data going much further back.

The last archive also contains 16 data points, but this time one data point is an aggregated average of the last 12 polls. Therefore, each data point in the archive represents one whole hour, but allows us to keep data from 16 hours earlier.

As can be seen in this example, if you go beyond the previous 80 minutes, you will lose the data granularity, as aggregation kicks in.

The default RRA definitions of Cacti are:

  • Daily (5-minute Average)

  • Weekly (30-minute Average)

  • Monthly (2-hour Average)

  • Yearly (1-day Average)

As the default polling interval for Cacti is five minutes, the daily data will have the most detailed data. Unfortunately, the Daily 5-minute Average RRA will only keep this detailed data for 2 days, after which you will lose the detailed information. This can be changed in Cacti, but will also increase the RRD file size significantly.

There are many more options available during the RRD file creation. If you are interested in learning more, you will find some links and references in the previous appendix.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image