Cacti: Difference between revisions
(Draft: Added some links to templates) |
m (→Upgrade: Added note to prevent auto-upgrade) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{|class="vwikitable" | |||
|- | |||
! File / Path !! Usage | |||
|- | |||
| <code>/usr/share/cacti/</code> || Main software location | |||
|- | |||
| <code>/usr/share/cacti/index.php</code> || Target of Apache config (the Cacti website) | |||
|- | |||
| <code>/usr/share/cacti/include/config.php</code> || MySQL config | |||
|- | |||
| <code>/etc/cacti/</code> || More config files | |||
|- | |||
| <code>/var/lib/cacti/rra</code> || RRD files | |||
|- | |||
| <code>/etc/apache2/conf.d/cacti.conf</code> || Apache config | |||
|} | |||
== Installation == | == Installation == | ||
# Start installation… | # Start installation… | ||
Line 8: | Line 25: | ||
# Enter password for cacti MySQL account (eg cacti) | # Enter password for cacti MySQL account (eg cacti) | ||
# Log into server using URL http://server/cacti | # Log into server using URL http://server/cacti | ||
== Upgrade == | |||
There is an upgrade procedure on Cacti's website (http://www.cacti.net/downloads/docs/html/upgrade.html), I'm not sure I agree with the order of the steps, in that I suspect it could prolong the time for which you can't capture data, but otherwise it seems fine. I don't know that my procedure is any better, but it works for me. | |||
Be aware that I originally installed Cacti from the Ubuntu repository, which I now tend to think is a bad idea for anything other than core OS components (as it can be years out of date, and installs to different locations than you would do manually, making subsequent upgrades a royal pain in the ass, I digress). So your files may not be in the same location as above (originally I had a <code>site</code> subfolder). | |||
# Download the latest version, and uncompress | |||
#* EG <code> cd /usr/share </code> | |||
#* EG <code> wget http://www.cacti.net/downloads/cacti-0.8.7i.tar.gz </code> | |||
#* EG <code> tar -xzvf cacti-0.8.7i.tar.gz </code> | |||
# Update the MySQL config in the new version | |||
#* EG <code> vi cacti-0.8.7i/include/config.php </code> | |||
# Backup your existing database | |||
#* EG <code> mysqldump -u root -p -l cacti > /home/user/cacti-v0.8.7e.mysql </code> | |||
# Check the poller cron job, if the poller.php path is changing, add an entry for the new path (we can remove the old path once everything is working) | |||
#* EG <code> vi /etc/cron.d/cacti </code> | |||
# Check the path that RRA's are expected to go to | |||
#* Compare the <code> $config["rra_path"] </code> value in <code>/include/global.php</code>, if necessary override in <code>/include/config.php</code> | |||
# Check the Apache config | |||
# Switch the folders around | |||
#* EG <code> mv cacti cacti-v0.8.7e </code> | |||
#* EG <code> mv cacti-0.8.7i cacti </code> | |||
# Browse to your installation, and upgrade the database | |||
# Once complete go to System Utilities > View Cacti Log File, and check everything is looking OK | |||
# Remove additional path from crontab (if you added one) | |||
If you've upgraded an installation that was installed automatically with <code>aptitude</code> or <code>apt-get</code> then you'll need to stop it being mangled/downgraded in the future, to do so run | |||
aptitude hold 'cacti' | |||
== Templates == | == Templates == | ||
Line 13: | Line 58: | ||
* Disk: http://forums.cacti.net/about12742.html | * Disk: http://forums.cacti.net/about12742.html | ||
* Disk Usage: http://docs.cacti.net/usertemplate:data:host_mib:disk_usage | * Disk Usage: http://docs.cacti.net/usertemplate:data:host_mib:disk_usage | ||
* MySQL: http://code.google.com/p/crunchtools/source/browse/#hg%2Fcacti%2Fgraph_mysql_stats | |||
[[Category:Monitoring]] | |||
[[Category:Ubuntu]] | |||
[[Category:Applications]] |
Latest revision as of 13:54, 10 August 2012
File / Path | Usage |
---|---|
/usr/share/cacti/ |
Main software location |
/usr/share/cacti/index.php |
Target of Apache config (the Cacti website) |
/usr/share/cacti/include/config.php |
MySQL config |
/etc/cacti/ |
More config files |
/var/lib/cacti/rra |
RRD files |
/etc/apache2/conf.d/cacti.conf |
Apache config |
Installation
- Start installation…
apt-get install cacti-cactid
- OK past
libphp-adodb
warning - Select Apache2 webserver
- Select Yes for cacti database auto-configuration by dbconfig-common?
- Enter MySQL root password
- Enter password for cacti MySQL account (eg cacti)
- Log into server using URL http://server/cacti
Upgrade
There is an upgrade procedure on Cacti's website (http://www.cacti.net/downloads/docs/html/upgrade.html), I'm not sure I agree with the order of the steps, in that I suspect it could prolong the time for which you can't capture data, but otherwise it seems fine. I don't know that my procedure is any better, but it works for me.
Be aware that I originally installed Cacti from the Ubuntu repository, which I now tend to think is a bad idea for anything other than core OS components (as it can be years out of date, and installs to different locations than you would do manually, making subsequent upgrades a royal pain in the ass, I digress). So your files may not be in the same location as above (originally I had a site
subfolder).
- Download the latest version, and uncompress
- EG
cd /usr/share
- EG
wget http://www.cacti.net/downloads/cacti-0.8.7i.tar.gz
- EG
tar -xzvf cacti-0.8.7i.tar.gz
- EG
- Update the MySQL config in the new version
- EG
vi cacti-0.8.7i/include/config.php
- EG
- Backup your existing database
- EG
mysqldump -u root -p -l cacti > /home/user/cacti-v0.8.7e.mysql
- EG
- Check the poller cron job, if the poller.php path is changing, add an entry for the new path (we can remove the old path once everything is working)
- EG
vi /etc/cron.d/cacti
- EG
- Check the path that RRA's are expected to go to
- Compare the
$config["rra_path"]
value in/include/global.php
, if necessary override in/include/config.php
- Compare the
- Check the Apache config
- Switch the folders around
- EG
mv cacti cacti-v0.8.7e
- EG
mv cacti-0.8.7i cacti
- EG
- Browse to your installation, and upgrade the database
- Once complete go to System Utilities > View Cacti Log File, and check everything is looking OK
- Remove additional path from crontab (if you added one)
If you've upgraded an installation that was installed automatically with aptitude
or apt-get
then you'll need to stop it being mangled/downgraded in the future, to do so run
aptitude hold 'cacti'