Cacti is a complete frontend to RRDTool, it stores all of the necessary information to create graphs and populate them with data in a MySQL database. The frontend is completely PHP driven. Along with being able to maintain graphs, data sources, and round robin archives in a database, cacti handles the data gathering. There is also SNMP support for those used to creating traffic graphs with MRTG.
Cacti requirement:
MySQL
PHP
RRDTool
net-snmp
PHP-snmp
Apache (compiled with php support)
Extract the distribution tarball.
Shell > tar xzvf cacti-version.tar.gz
Create the MySQL database:
Shell > mysqladmin–user = root create cacti
Import the default cacti database:
Shell > mysql cacti<>
Optional: Create a MySQL username and password for cacti.
Shell > mysql–user = root mysql
MySQL > GRANT ALL ON cacti. * TO cactiuser@localhost IDENTIFIED BY ‘somepassword’;
MySQL > flush privileges;
Edit include/config.php and specify the MySQL user, password and database for your cacti configuration.
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “cacti”;
Set the appropriate permissions on cacti’s directories for graph / log generation. You should execute these commands from inside cacti’s directory to change the permissions.
Shell > chown-r cactiuser rra / log /.
(Enter a valid username for cactiuser, this user will step for data be so used in the next gathering.)
Add a line to your/etc/crontab file similar to: * / 5 * cactiuser php /var/www/html/cacti/poller.php >/dev/null 2 > & 1
Replace cactiuser with the valid user specified in the previous step.
Replace/var/www / html/cacti/cacti with your full path.
Point your web browser to:
http://your-server/cacti/ log in the with a username/password of admin.
You will be required to change this password immediately.
Make sure to fill in all of the path variables carefully and correctly on the following screen.
Comments
Powered by Facebook Comments