- http://www.geekamongus.com/2009/01/31/c ... 10-part-1/
http://cactiusers.org/wiki/PluginArchitectureInstall
http://cactiusers.org/wiki/PluginsInstall
http://docs.cacti.net/plugin:realtime
http://docs.cacti.net/plugin:settings
http://docs.cacti.net/plugin:thold
http://www.eric-a-hall.com/software/cacti-cisco-memory/
yum update
yum install -y mysql mysql-server httpd mod_ssl php php-snmp php-mysql net-snmp net-snmp-utils rrdtool cacti
Start MySQL and apache, and make sure they start on boot
- service mysqld start
service httpd start
service sendmail start
chkconfig httpd on --levels 235
chkconfig mysqld on --levels 235
chkconfig sendmail on --levels 235
setsebool httpd_can_sendmail on
Configuring MySQL, HTTP
/usr/bin/mysql_secure_installation
- current root password is BLANK
set root password to: STRONGPASSWORD1
remove anonymous users
disallow remote root login
remove test database
reload privilege tables
mysql -p cacti < /usr/share/doc/cacti-0.8.7e/cacti.sql
mysql -u root -p mysql
- GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'STRONGPASSWORD2';
flush privileges;
exit
cp /etc/cacti/db.php /etc/cacti/db.php.orig
vi /etc/cacti/db.php
- $database_password = "STRONGPASSWORD2";
- Remove the # from the beginning of this line so it looks like this:
*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
- #
# Cacti: An rrd based graphing tool
#
Alias /cacti /usr/share/cacti
<Directory /usr/share/cacti/>- Order Deny,Allow
Deny from all
Allow from all
- Order Deny,Allow
Find the link for the latest PA version (plugin architecture) wget http://mirror.cactiusers.org/downloads/ ... A-v2.6.zip
unzip cacti-plugin-0.8.7e-PA-v2.6.zip
cp -r cacti-plugin-arch/files-0.8.7e/* /usr/share/cacti
mysql -p cacti < cacti-plugin-arch/pa.sql
vi /usr/share/cacti/include/global.php
- $database_password = "STRONGPASSWORD2";
$config['url_path'] = '/cacti/';
wget -O realtime-0.4.0-1.tar.gz http://docs.cacti.net/_media/plugin:rea ... ache=cache wget -O settings-latest.tgz http://docs.cacti.net/_media/plugin:set ... ache=cache wget -O thold-latest.tgz http://docs.cacti.net/_media/plugin:tho ... ache=cache
cp realtime-0.4.0-1.tar.gz /usr/share/cacti/plugins
cp settings-latest.tgz /usr/share/cacti/plugins
cp thold-latest.tgz /usr/share/cacti/plugins
cd /usr/share/cacti/plugins/
tar -zxf /usr/share/cacti/plugins/realtime-0.4.0-1.tar.gz
tar -zxf /usr/share/cacti/plugins/settings-latest.tgz
tar -zxf /usr/share/cacti/plugins/thold-latest.tgz
ln -s /usr/share/cacti/plugins/settings-0.6 /usr/share/cacti/plugins/settings
ln -s /usr/share/cacti/plugins/thold-0.41 /usr/share/cacti/plugins/thold
chown -R root:root /usr/share/cacti/plugins/*
chmod -R 755 /usr/share/cacti/plugins/realtime
chmod -R 755 /usr/share/cacti/plugins/settings
chmod -R 755 /usr/share/cacti/plugins/thold
mkdir /usr/share/cacti/realtime-rrd
If you are running SELinux, it is necessary to modify the settings of realtime (more on this later).
chcon -R -t httpd_cache_t /usr/share/cacti/realtime-rrd
Final Cacti Configuration
browse to http://serverip/cacti
- Next
Select New Install - Next
Finish
Log in as admin/admin- change admin password to: STRONGPASSWORD3
- check the box to allow Plugin Management and Save
- Install and Enable Settings
Install and Enable Realtime
Install and Enable Thresholds
- check the box to allow View Thresholds
check the box to allow Plugin -> Realtime and Save
- Misc
- Set the Cache Directory to realtime-rrd
Devices
- Add a device, and specify IP and SNMP credentials
If SNMP is successful you will see SNMP Information in the top left of the device screen
By default it should have added the SNMP – Interface Statistics to the Associated Data. You can also verify the status of the SNMP – Interface Statistics Data Query – it should say “success†and show a bunch of items and rows. If you're really curious, you can click Verbose Query to get the raw SNMP data.
Create Graphs for this Host- Under Data Query, select the interfaces you need
Select the appropriate Graph Type- For 10/100 interfaces you can use In/Out bits with 95th Percentile
For GigE interfaces you can use In/Out bits (64 bit counters)
Currently VLAN interfaces don't report statistics properly so don't bother
- For 10/100 interfaces you can use In/Out bits with 95th Percentile
- Under Data Query, select the interfaces you need
Graph Trees
- Click Add
- Tree Item Type – Host
Choose the Host that you want added to the tree
- Tree Item Type – Host
Cisco – CPU Usage Graph Template
Add the template to your device, and create graphs
- Devices
Choose your device
Associated Graph Template- Add Cisco – CPU Usage
Create Graphs for this Host- Under Graph Templates, select Cisco – CPU Usage
Graph Type can be In/Out bits with 95th Percentile
tar -zxf cacti-cisco-memory.0.3.tar.gz
cd cacti-cisco-memory
cp resource/cisco_memory.xml /usr/share/cacti/resource/snmp_queries/
browse to http://serverip/cacti
- Import Templates
Choose File template/cisco_memory_data_query.xml
Save
- Devices
Choose your device
Associated Data Queries- Add Cisco Router – Memory Usage
Create Graphs for this Host- Under the Memory Pool Data Query, select all three graphs
Graph Type can be In/Out bits with 95th Percentile