Cacti with Nagios
From Nagios Wiki
[edit] CentOS
min install
[edit] CentOS LAMP
[edit] Install Cacti
yum install cacti* mysqladmin create cacti mysql -uroot -p (password) mysql>GRANT USAGE ON * . * TO 'root'@'localhost' IDENTIFIED BY 'password'; mysql>GRANT SELECT , INSERT , UPDATE , DELETE , CREATE , DROP , INDEX , ALTER ON cacti . * TO 'cacti'@'localhost'; mysql>quit; mysql cacti -uroot -ppassword < /var/www/cacti/cacti.sql
vim /var/www/cacti/include/config.php
change passwords
/* make sure these values refect your actual database/host/user/password */ $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; //$database_username = "cactiuser"; $database_username = "cacti"; //$database_password = "cactiuser"; $database_password = "password"; $database_port = "3306";
cd /var/www/html ln -s ../cacti/ cacti
follow wizard
http://box.domain.com/cacti/install/ -> NEXT
http://box.domain.com/cacti/install/index.php -> NEXT
New install Database User: cacti Database Hostname: localhost Database: cacti Server Operating System Type: unix
Cacti Installation Guide Make sure all of these values are correct before continuing. [FOUND] RRDTool Binary Path: The path to the rrdtool binary. /usr/bin/rrdtool [OK: FILE FOUND] [FOUND] PHP Binary Path: The path to your PHP binary file (may require a php recompile to get this file). /usr/bin/php [OK: FILE FOUND] [FOUND] snmpwalk Binary Path: The path to your snmpwalk binary. /usr/bin/snmpwalk [OK: FILE FOUND] [FOUND] snmpget Binary Path: The path to your snmpget binary. /usr/bin/snmpget [OK: FILE FOUND] [FOUND] snmpbulkwalk Binary Path: The path to your snmpbulkwalk binary. /usr/bin/snmpbulkwalk [OK: FILE FOUND] [FOUND] snmpgetnext Binary Path: The path to your snmpgetnext binary. http://nagios.yourdomain.com/cacti/install/index.php [OK: FILE FOUND] [FOUND] Cacti Log File Path: The path to your Cacti log file. /var/www/cacti/log/cacti.log [OK: FILE FOUND] SNMP Utility Version: The type of SNMP you have installed. Required if you are using SNMP v2c or don't have embedded SNMP support in PHP. NET-SNMP 5.x RRDTool Utility Version: The version of RRDTool that you have installed. RRDTool 1.2.x NOTE: Once you click "Finish", all of your settings will be saved and your database will be upgraded if this is an upgrade. You can change any of the settings on this screen at a later time by going to "Cacti Settings" from within Cacti.

