As my network at home has got busier, I�ve been finding weird things are going on and so have needed to implement a degree of monitoring on my network (if only to keep tabs on where all my hard drive space is going), I looked at a number of possibilities but have settled on SNMP monitoring via �Cacti�, running on a Debian 3.1 �Sarge� linux server�
The Debian SNMP Process
Install Debian via Net Install CDs
- Boot from the CD
- Choose:
- Language
- Region
- Keyboard Layout
- Enter a hostname
- Prepare Disks
- Erase All / Auto Partition
- All Files in one Partition
- Write Changes
- Install GRUB boot loader
- [Reboot]
[ Hardware Detection Phase ]
[ Creates Partitions / Writes File System ]
[ System Reboots ]
Initial Configuration
- Set time to GMT? No
- Set Timezone Pacific/Auckland
- Set Root Password [Your Password Here]
- Create User Account(s) [Your Username & Password here]
- Archive access Method [FTP]
- Select Mirror Country
- Select Mirror Site
- Select Packages [Select None]
- Configuring Exim v4 (Mail)
- No configuration at this time
- (Notice that you can configure mail later by using dpkg-reconfigure exim-config as root
- Root & postmaster mail recipient [Your Username Here]
- Configuration Complete
[ Downloads Key System Files ]
[ Downloads System Updates & Core Packages]
[ Login Prompt ]
Set Static IP Address
- Login
- Switch to �su� (root)
- Update apt resources
- Install �vim� (text editor)
- Edit network interface file
- Change the line:
- Apply the configuration type:
apt-get update
apt-get install vim
vim /etc/network/interfaces
iface eth0 inet dhcp
to:
iface eth0 inet static
address [a valid IP address] (e.g. 10.1.1.xxx)
netmask [your netmask] (e.g. 255.255.255.xxx)
network [your network] (e.g. 10.1.1.0)
broadcast [your network] (e.g. 10.1.1.0)
gateway [your gateway] (e.g. 10.1.1.xxx)
and save/exit the file ( :wq )
/etc/init.d/networking restart
Or
reboot the system with shutdown -r now
Install �Cacti� [ http://www.cacti.net/ ]
Auto magic method (from http://forums.cacti.net/about9179.html )
- As ‘su’ (root)
aptitude install cacti
adduser cacti
mysqladmin --user=root create cacti
mysql -u root -e "grant all privileges on cacti.* to cacti@localhost identified by 'cacti'; flush privileges;"
zcat /usr/share/doc/cacti/cacti.sql.gz | mysql -u cacti --password=cacti cacti
echo "extension=mysql.so" >> /etc/php4/apache/php.ini
/etc/init.d/apache restart
- goto http://localhost/cacti
- click on okay for everything until you get to the main page.
- click on the “graphs” tab.
- you will see some broken looking stuff.
- wait for 10 whole minutes, hit refresh and you will see nice graphs.
(takes a while – will install apache, php4, mysql – and ask you some questions – just default on all of them. when it asks you about names and passwds, use ‘cacti’ for everything.)
(also, the message about “libphp-adodb isn’t longer installed in /usr/lib/adodb. etc.” doesn’t seem to be valid – so for now, ignore it.)
(not sure if you actually have to do this step, but it won’t hurt.)
Once again Google is my friend, and the details contained herein can be found elsewhere, links and attributations have been made where possible so don’t be suprised if you read the same stuff here as you’ve seen in a related forum somewhere else on the net.