Projects 2008

HOW TO INSTALL AND CONFIGURE MRTG IN UBUNTU

1. Installation. Type ‘yes’ when a message pop up for security purposes

sudo apt-get install apache2 snmpd mrtg

Notes:

apache2: can be replaced by opening your browser and typing your path (file:///var/www/…)
snmpd: is not necessary if you’re using scripts without the snmp service(for this configuration it’s required though)
In RedHat: yum install mrtg

2. Now you need to edit the mrtg configuration file to edit the some of the settings
File is located at /etc/mrtg.cfg you need to change the global settings as follows

# Global Settings

RunAsDaemon: yes
EnableIPv6: no
WorkDir: /var/www/mrtg
Options[_]: bits,growright
WriteExpires: Yes

Title[^]: Traffic Analysis for

3. Now we need to assign the snmp community name in snmp configration file /etc/snmp/snmpd.conf

# sec.name source community
# com2sec paranoid default public
com2sec readonly default public
#com2sec readwrite default private

4. Restart snmp

/etc/init.d/snmpd restart

5. Obtain right permissions for the following two instructions

sudo sh

6. Create the mrtg.cfg file

cfgmaker public@localhost > /etc/mrtg.cfg

7. Creating index file for the webserver using

indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

8. Restart the computer

9. To run MRTG, open your browser and type:

http://localhost/mrtg/

Logs viewer can be helpful, run in the terminal

tail -f /var/log/syslog
or
tail -f /var/log/mrtg/mrtg.log

References:

http://www.debianhelp.co.uk/mrtg.htm
http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html

Examples:
http://mrtg-pme.sourceforge.net/
http://web.csma.biz/apps/deliverytimes.shtml
http://www.webinject.org/mrtgplugin.html
http://www.cloudnet.com/~tom/mrtg/thresh.html

October 19, 2008 - Posted by aes | developer | | No Comments Yet

No comments yet.

Leave a comment