Book Image

Cacti 0.8 Network Monitoring

Book Image

Cacti 0.8 Network Monitoring

Overview of this book

Cacti is a network monitoring tool that provides graphic solutions to your everyday monitoring issues. It has a wide variety of features and misusing them can mean that you are not monitoring your network as closely as you think. This book takes you through all of the key features of Cacti and shows how to use them for maximum effectiveness. This book will teach you how to use Cacti effectively to monitor your network through its web interface leaving aside all the heavy chunks of code. You will be introduced to all the features of Cacti in an easy-to-understand format. This book introduces Cacti and goes through its complete installation and setup. After a quick look, it will teach you to use Cacti's amazing graph templating and user management features. You will learn to customize graphs and make them better looking and easier to understand. It will teach you to provide the paths to any external script or command using Cacti. Then it will take you through importing and managing new templates and also customizing them. Creating users and assigning permissions to them is the next step in this book. Towards the end, you will learn to take backups and restore the system.
Table of Contents (13 chapters)

Basic knowledge on RRDtool


RRDTool is a high performance data logging and graphing system, designed to handle time series data like network bandwidth, room temperature, CPU load, server load, and to monitor devices such as routers, UPS, etc. It is also known as the round-robin database tool, an industry standard, open source solution. It lets the administrator log and analyze data collected from all kinds of data sources (DS), which are capable of answering SNMP queries. The data analysis part of the RRDTool is based on the ability to generate graphical representations of the data values collected over a definable time period.

RRDTool is developed by Tobi Oeticker, also known for his famous creation MRTG. RRDTool is written in C language and stores its data in .rdd files. The number of records in a single .rrd file never increases, meaning that old records are frequently removed, and it presents useful graphs by processing the data to enforce a certain data density. RRDTool offers several command line switches to access and manipulate .rdd files:

  • create

  • update

  • updatev

  • graph

  • dump

  • restore

  • fetch

  • tune

  • last

  • info

  • rrdresize

  • xport

  • rrdcgi

Note

Details of the command line switches of the RRDTool can be obtained from http://oss.oetiker.ch/rrdtool/doc/rrdtool.en.html.

There are also a number of language bindings for RRDTool, which allow administrators or programmers to use it directly from Perl, Python, tcl, PHP, and Ruby. So, it can be used to write custom monitoring shell scripts or create whole applications using its language bindings. Cacti is an application written in PHP, using its PHP language binding.

How does the RRDTool work?

RRDTool follows a logical design to acquire and process data collected from data sources (DS). The following is a brief discussion of the different steps in the logical process:

  • Data acquisition: When monitoring a device or system, it is necessary to receive data on a constant time interval. Manually, it is not possible to maintain such activity as a system administrator. In such situations, the RRDTool comes in handy. It stores the data in a round-robin database, which is received on a constant time interval set by the system administrator, using the poller application set as scheduler in the operating system.

  • Data consolidation: The system administrator may log the data in a five-minute interval, but he/she might be interested in knowing the accumulated update over the last month. In this case, simply storing the data in a five-minute interval for the whole month will solve the problem. But this will require huge disk space and a considerable amount of time to analyse the data, as in a network environment, administrators are not monitoring only a single device. RRDTool solves this problem with the data consolidation feature. When creating a round-robin database, the administrator can define at which interval data consolidation should occur using consolidation functions (CF) such as MAXIMIUM, AVERAGE, MINIMUM, and others.

  • Round Robin Archives of consolidated data: Data values of consolidation setup are stored in Round Robin Archives (RRA). In this way, the RRDTool stores data in the most efficient way for a certain time period defined by the system administrator. This process keeps the database file at a constant size for faster processing and analyzing.

  • Unknown data: RRDTool stores data at a constant interval in a round-robin database. Sometimes, this data might not be available to store in RRD due to device failure or other causes. In this case, the RRDTool stores the RRD file with *UNKNOWN* data value. This *UNKNOWN* value is supported by all RRDTool functions.

  • Graphing: RRDtool allows system administrator to generate reports in graphical and numerical forms based on data stored in the round-robin database (RDD) by using its built-in graph processing functions. Customization of these graphics is possible based on color, size, and contents.