Skip navigation.

SERVER : Install CACTI (or at least try to :-))

, , , , , , , , ,

"CACTI is a complete network graphing solution designed to harness the power of RRDTool's data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices."

So, lets start installing CACTI.
First thing to do, is install its package, for that do
sudo apt-get install cacti

Of course, you'll have to be prepared to wait some time, as it needs to download about 6-8Mb of data.

At the beginning of the installation, you'll get a warning that the "Include path for PHP has changed", we'll deal with that later on, so just press the OK button.
After a while, you'll see another message, it asks you if you want to automatically add the database needed by cacti. Since we're installing it the first time, we should press Yes.
You'll be asked about the password of your root user (not the system root user but the MySQL root user) so you should enter that password then press OK, on the next screen it will ask for a password for CACTI, just let it create a random password and use that one, so press OKon the next screen it will ask what kind of webserver you're using, in our case is Apache2, so select that one.

If you get the following error : "mysql said: ERROR 1049 (42000): Unknown database 'cacti'" then open up your phpMyAdmin and create a new table with the cacti name. After you've created the cacti database, come back to the installer, press OK and then retry . It will jump back to the question if cacti should autoconfigure, just answer yes, enter the MySQL root user password and leave the cacti password empty.

If everything went OK, you should be returned at the prompt and see this :
dbconfig-common: flushing administrative password

Creating config file /etc/cacti/apache.conf with new version
 * Reloading apache 2.0 configuration...                                   [ ok ]



Now we need to open up a webpage to configure cacti, for that, open up a browser window with http://your_server_ip/cacti and you should see this page : just press the Next > > button.
On the next window make shore you select New Install and press Next > >
On the next screen you should have something similar with this image :
If everything seems to be ok then press the Finish button.
Now you'll get to the login screen. First time you should log in with admin as both username and password
Because of security considerations, it will now ask you to change the password for the admin user, so enter a password you can remember and then press Save.

:idea: If you can see the statistics but don't see any picture in CACTI, you might not have the php4-mysql or php5-mysql module installed or configured propertly. To check if the mysql module has really been added, you can check it with this :
php -m | grep mysql
you should get an answer similar to this :
PHP Warning:  mime_magic: type regex            BEGIN[[:space:]]*[{]    application/x-awk invalid in Unknown on line 0
mysql

If you don't get the above answer, then maybe your php4-mysql or php5-mysql module is not installed. You can force to install it with
apt-get install php4-mysql php5-mysql php5-mysqli

Now you should try this :
sudo dpkg-reconfigure php4-mysql
and answer Yes to the question if "Should MySQL be added to /etc/php4/cli/php.ini?"
Now do the same for PHP5, so run
sudo dpkg-reconfigure php5-mysql
and answer Yes to the question " Should MySQL be added to /etc/php5/apache2/php.ini?". You might get a second question "Should MySQL be added to /etc/php5/cgi/php.ini?" asnwer Yes to that one too.
Now we need to tell the Apache webserver to reload the settings, so just run this :
sudo apache2ctl restart

Now you should finally see your images.

:idea: Don't worry if at the beginning you see the images but there's no data just the grids, just leave some time (about 15-20 minutes) and then check the graphs again. After all, CACTI needs some time to pass in order to make the statistics.

Happy graphing.

P.S. I'm not going to tell you how to add new graphs, you should experiment, or simply look at the CACTI documentation for more info Here

SERVER : Install MRTG for TorrentFluxSERVER : TorrentFlux and MRTG for TorrentFlux problems.

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.

November 2009
S M T W T F S
October 2009December 2009
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30