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)

Restoring from a backup


Now, it is time to restore your Cacti from the backup. Like the backup, the restore process also has two parts, first files and then the database. Before restoring it, we need to remove the old Cacti files:

$ rm rf /path/to/oldcacti

This command will remove old Cacti files, so be careful before doing this. Then, we will restore files:

$ cp a /path/to/backup/cacti /path/to/cacti

Your files are ready. Now, let's restore the database:

$ mysql ucacti pcacti987 cacti < cacti_xx_yy_zz.sql

This command will restore the database. You need to make sure that the MySQL server has a Cacti user with the appropriate password and also a blank database called cacti.

Our files and database are ready, now we have to create a cron job that will run poller.php every five minutes:

$ nano /etc/cron.d/cacti

And paste following text there:

*/5 * * * * www-data php /var/www/cacti/poller.php > /dev/null 2>&1

Now, open Cacti in your browser. If you are getting any MySQL related...