Cacti: RRDTool-based Graphing Solution - Get Cacti Up and Running
(Page 3 of 4 )
On the first page of this article we mentioned the list of services that are mandatory for Cacti. Please refer back to those and get them ready before moving on. Right after that, download the latest release of Cacti from this page. Let’s assume you are going to install Cacti on a Linux server. First you'll need to extract the distribution tarball.
tar xzvf cacti-version.tar.gz
Cacti needs its own database and a user with appropriate rights. This means we’re required to set up a new cacti user with those rights, create the necessary database (Cacti comes with an .sql script that does this), and finally edit the configuration file (/include/config.php) of Cacti with these details so that it is able to connect to the DB.
mysqladmin --user=root create cacti
mysql cacti < cacti.sql [note: this must be run from Cacti’s folder]
mysql --user=root mysql
GRANT ALL ON cacti.* TO youruser@localhost IDENTIFIED BY 'password';
flush privileges;
And now the snippet of config.php that we have edited:
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "youruser";
$database_password = "password";
Now we need to set write permissions to /rra and /logs directories of Cacti.
chown -R cactiuser rra/ log/
All right, now it’s time to schedule the poller into Crontab for every five minutes.
Finally, there’s one finishing touch left. We should allocate enough memory to Cacti; something like 128-256mb should suffice. Find the PHP config file (/etc/php.ini):
mory_limit=128m
At this point, Cacti should be ready. You can access its web-interface by pointing your browser to: http://your_server/cacti -- it's as easy as that. There are attributes to be configured first. You will also be required to change your initial password; that is admin by default (both the user and password are admin).
Once Cacti is up and running, the real fun begins. By all means you should first read and dwell on the official documentation of Cacti. You are going to find solutions and answers to most of your problems by reading the HowTo entries and Manuals. Then of course, the plugin architecture is also explained in great detail.
Unlike other network monitoring suites such as Nagios and Zeenoss, Cacti does not support SLA reports, logical grouping, or syslog (out of box), and it does not have inventorying capabilities. Though it’s an amazing resource for creating fancy graphs, which are nice for trending, it does not support trend predictability.
An independent project led by a single man is called CactiEZ. This nifty tool sets up a minimalist version of CentOS Linux distribution, installs the required services, and automatically sets up Cacti as well. The purpose of CactiEZ is to automate the entire process. Furthermore, it also comes with a healthy dose of extensions, extra plugins, and so forth.