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)


Cacti is a web-based, PHP/MySQL graphing solution to monitor network bandwidth with SNMP using the RRDTool engine—developed by Tobi Oeticker who is already the creator of the famous MRTG. RRDtool is a program developed in C and it stores collected data on .rrd files. Cacti's strength lies in the fact that it can be installed and used easily. You don't need to be a guru or spend hours to configure it. Also, the official forum for Cacti is very active and supports Cacti users and there are lots of Cacti templates that can save your time. You can also add plug-ins to Cacti enabling the possibility of integration with other open source tools such as ntop or PHP Weathermap. This is the best RRDtool frontend.

What this book covers

Chapter 1 is an overview of Cacti.

Chapter 2 covers the installation of Cacti on a Linux machine using both APT and a manual installation.

Chapter 3 covers creating devices, adding graph templates, and monitoring network-attached devices.

Chapter 4 covers the creation and usage of templates in Cacti.

Chapter 5 covers the creation of users in Cacti and assigning permissions to view and edit graphs, also assigning realm permissions to access the management console to manage devices.

Chapter 6 covers how Simple Network Management Protocol works—its process to work with network-attached SNMP-enabled devices. We'll also see how Net-SNMP application suite implements SNMP and Cacti uses Net-SNMP to retrieve raw data from managed-system, and then uses the RRDTool to create graphs for easy understanding.

Chapter 7 covers the creation of a new data input method and data query. Also, we'll learn the details of SNMP query XML and Script query XML. At the end of this chapter, we'll see how to create a graph for a single SNMP OID.

Chapter 8 will cover some advanced topics like: Cacti's directory structure, Cacti's backup procedure, Cacti's restore procedure, and Cacti's CLI features.

Who this book is for

This book is for anyone who wants to manage a network using Cacti. You don't have to be a Linux Guru to use this book.


In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "We can include other contexts through the use of the include directive."

A block of code will be set as follows:

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";

Any command-line input or output is written as follows:

$ apt-get install php5 libapache2-mod-php5
$/etc/init.d/apache2 restart

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: "clicking the Next button moves you to the next screen".


Warnings or important notes appear in a box like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply drop an email to, and mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note via the SUGGEST A TITLE form on, or send an email to.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book on, see our author guide on

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.


Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration, and help us to improve subsequent versions of this book. If you find any errata, please report them by visiting, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to any list of existing errata. Any existing errata can be viewed by selecting your title from


Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately, so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.


You can contact us at if you are having a problem with any aspect of this book, and we will do our best to address it.