Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Cacti 0.8 Beginner's Guide
  • Table Of Contents Toc
Cacti 0.8 Beginner's Guide

Cacti 0.8 Beginner's Guide

By : Thomas Urban
4.3 (8)
close
close
Cacti 0.8 Beginner's Guide

Cacti 0.8 Beginner's Guide

4.3 (8)
By: Thomas Urban

Overview of this book

Cacti is a performance measurement tool that provides easy methods and functions for gathering and graphing system data. You can use Cacti to develop a robust event management system that can alert on just about anything you would like it to. But to do that, you need to gain a solid understanding of the basics of Cacti, its plugin architecture, and automation concepts. Cacti 0.8 Beginner's Guide will introduce you to the wide variety of features of Cacti and will guide you on how to use them for maximum effectiveness. Advanced topics like the plugin architecture and Cacti automation using the command-line interface will help you build a professional performance measurement system.Designed as a beginner's guide, the book starts off with the basics of installing and using Cacti, and also covers the advanced topics that will show you how to customize and extend the core Cacti functionalities. The book offers essential tutorials for creating advanced graphs and using plugins to create enterprise-class reports to show your customers and colleagues. From data templates to input methods and plugin installation to creating your own customized plugins, this book provides you with a rich selection of step-by-step instructions to reach your goals. It covers all you need to know to implement professional performance measurement techniques with Cacti and ways to fully customize Cacti to fit your needs. By the end of the book, you will be able to implement and extend Cacti to monitor, display, and report the performance of your network exactly the way you want.
Table of Contents (23 chapters)
close
close
Cacti 0.8Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
4
Pop Quiz Answers
5
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.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Cacti 0.8 Beginner's Guide
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon