From MattWiki

FedoraLogo infinity-2.png Note: This Page was written with Fedora 8, 9, & 10 in mind, and may not work correctly with other versions or distributions.

Cacti Logo.png

Installing Cacti[edit | edit source]

Installing Cacti using Yum[edit | edit source]

yum install cacti gcc libtool httpd mysql mysql-server mysql-devel net-snmp net-snmp-utils net-snmp-devel openssl-devel

Now install the sql database

mysqladmin create cacti
echo "GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser';" |mysql -t
mysql cacti < /usr/share/doc/cacti-0.8.7d/cacti.sql

Now edit the config file.

vim /usr/share/cacti/include/config.php

Installing Cacti from the tar ball[edit | edit source]

Installing Cacti's Prerequisite[edit | edit source]

yum install net-snmp net-snmp-utils rrdtool libdbi
ln /lib/ /lib/

Installing Cacti[edit | edit source]

cd /var/www/html
tar -xzf cacti-0.8.7d.tar.gz
mv cacti-0.8.7d.tar.gz cacti
cd cacti

Setting up a fresh install of Cacti[edit | edit source]

#If this is a fresh install run the following to update the database
mysqladmin create cacti
echo "GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser';" |mysql -t
mysql -u cactiuser -pcactiuser cacti < cacti.sql

Next you will need to edit the config file to tell Cacti were the database is and how to get into it.

vim /var/www/html/cacti/include/config.php

You will need to change:

  • $database_username
  • $database_password

After you have saved the config file you should be able to access your new Cacti page. but there should be now data in the database yet. To add the data you will need to poller.php file to your cron tab.

*/5 * * * * php /var/www/html/cacti/poller.php > /dev/null 2>&1

Spine[edit | edit source]

Spine's Prerequisite[edit | edit source]

yum install autoconf net-snmp-devel mysql mysql-devel openssl-devel sysconftool libtool

Downloading and Compiling Spine[edit | edit source]

tar -xzf cacti-spine-0.8.7c.tar.gz

cd cacti-spine-0.8.7c
autoreconf --force --install --symlink && chmod 755 configure && ./configure && make && echo $?

make install && ln -s /usr/local/spine/etc/spine.conf /etc/spine.conf && echo $?
  • Make sure you update your database info in the spine config file also.

Cacti Addons[edit | edit source]

Postfix Status Monitor[edit | edit source]

  • Required Packages
yum install perl-File-Tail libdb
ln -s /lib/ /lib/

This is a rewrite for Cacti, of Joel Knight's MRTG Postfix Monitor setup found at his site. This setup was built for Cacti 0.8.7b.

You can download the templates here.

Add the following lines to /etc/snmp/snmpd.conf

exec postfix_received /var/net-snmp/postfix-stats-get received
exec postfix_delivered /var/net-snmp/postfix-stats-get delivered
exec postfix_sent /var/net-snmp/postfix-stats-get sent
exec postfix_bounced /var/net-snmp/postfix-stats-get bounced
exec postfix_rejected /var/net-snmp/postfix-stats-get rejected
exec postfix_unknown /var/net-snmp/postfix-stats-get unknown
exec postfix_spam /var/net-snmp/postfix-stats-get spam
exec postfix_virus /var/net-snmp/postfix-stats-get virus

Therefore the OID query's will be:

OID input command Description
. received Number of messages received by Postfix
. delivered Number of messages delivered to a mailbox
. sent Number of messages sent from this posfix server
. bounced Number of messages sent from this server and bounced
. rejected Number of incoming messages rejected
. unknown Number of unknown messages (catch all)
. spam Number of spam messages
. virus Number of virus ridden messages

ApacheStats 0.4[edit | edit source]

Links[edit | edit source] Cacti Templates