# RRDtool
yum -y install cairo-devel pango-devel libxml2-devel wget "http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz" tar zxf rrdtool-1.4.5.tar.gz cd ./rrdtool-1.4.5/ ./configure --prefix=/usr/local/rrdtool-1.4.5 make make install ln -s /usr/local/rrdtool-1.4.5 /usr/local/rrdtool echo '/usr/local/rrdtool/lib' > /etc/ld.so.conf.d/rrdtool.conf /sbin/ldconfig cd ~
# Cacti
yum -y install net-snmp-utils mysqladmin -u root -p create cacti mysql -u root -p mysql
# mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'PASSWORD';
# mysql> flush privileges;
# mysql> exit
wget "http://www.cacti.net/downloads/cacti-0.8.7g.tar.gz"
tar zxf cacti-0.8.7g.tar.gz
cd /usr/local/
tar zxf ~/cacti-0.8.7g.tar.gz
chown -R root:root /usr/local/cacti-0.8.7g
ln -s /usr/local/cacti-0.8.7g /usr/local/cacti
cd ./cacti/
mysql -u cactiuser -p cacti < cacti.sql
sed -i -e '/^\$database_password = /s/cactiuser/PASSWORD/' ./include/config.php
chown apache ./include/config.php
chmod 600 ./include/config.php
chown apache ./rra
echo -e '*/5 * * * * apache /usr/bin/php /usr/local/cacti/poller.php >/dev/null 2>&1' >/etc/cron.d/cacti
{
echo -e 'Alias /cacti /usr/local/cacti'
echo -e ''
echo -e '<Directory /cacti>'
echo -e ' Order deny.allow'
echo -e ' Deny from all'
echo -e ' Allow from 127.0.0.1'
echo -e ' Allow from 192.0.2.0/24'
echo -e '</Directory>'
echo -e ''
echo -e 'RewriteEngine on'
echo -e 'RewriteRule ^/cacti/(.*) https://%{HTTP_HOST}/cacti/$1 [R,L]'
} > /etc/httpd/conf.d/cacti.conf
/sbin/service httpd graceful
cd ~
# https://pooh.gr.jp/cacti/ # RRDTool Binary Path: /usr/local/rrdtool/bin/rrdtool # User Name: admin # Password: admin # Console > Configuration > Settings > General > Event Logging > Log File Destination: Syslog/Eventlog Only > save # Console > Configuration > Settings > General > Required Tool Versions > RRDTool Utility Version: RRDTool 1.4.x > save
# Spine (Cactid)
yum -y install net-snmp-devel mysql mysql-devel openssl-devel
wget "http://www.cacti.net/downloads/spine/cacti-spine-0.8.7g.tar.gz"
tar zxf cacti-spine-0.8.7g.tar.gz
./configure --prefix=/usr/local/cacti-spine-0.8.7g
make
make install
ln -s /usr/local/cacti-spine-0.8.7g /usr/local/cacti-spine
cp -a /usr/local/cacti-spine/etc/spine.conf.dist /usr/local/cacti-spine/etc/spine.conf
sed -i -e '/^DB_Pass /s/cactiuser/PASSWORD/' /usr/local/cacti-spine/etc/spine.conf
chown apache /usr/local/cacti-spine/etc/spine.conf
chmod 600 /usr/local/cacti-spine/etc/spine.conf
cd ~
# Console > Configuration > Settings > Paths > Alternate Poller Path > Spine Poller File Path: /usr/local/cacti-spine/bin/spine > save # Console > Configuration > Settings > Poller > General > Poller Type: spine > save
# Graphs
# Traffic
# Console > Management > Devices > Localhost > SNMP Options > SNMP Version: Version 2 > SNMP Community: COMMUNITYNAME> save
# Console > Management > Devices > Localhost > Associated Data Queries > Add Data Query: SNMP - Interface Statistics > Re-Index Method: Uptime Goes Backwards > add
# Console > Create > New Graphs > Data Query [SNMP - Interface Statistics] > Select a graph type: In/Out Bits > eth0: Check > Create
# Console > Create > New Graphs > Data Query [SNMP - Interface Statistics] > Select a graph type: In/Out Unicast Packets > eth0: Check > Create
# Disk Space
# Console > Create > New Graphs > Data Query [Unix - Get Mounted Partitions] > /boot: Check > Create # Console > Create > New Graphs > Data Query [Unix - Get Mounted Partitions] > /: Check > Create