MRTG Print

  • 0

HOW-TO MRTG on cPanel

--------------------------------------------------------------------------------

The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network-links. MRTG generates HTML pages containing graphical images which provide a LIVE visual representation of this traffic. Check
http://www.ee.ethz.ch/stats/mrtg/ for an example.

Let's begin:

# Move to your download folder.
cd /root/downloads

# Unninstal in case we have an old/broken installation
rpm -e mrtg

# Get the rpm
wget
http://www.dedicated-resources.com/files/mrtg-2.9.17-1cpanel.i386.rpm

# Installing the app
rpm -Uvh mrtg-2.9.17-1cpanel.i386.rpm

# Moving libpng
cd /usr/lib
mv libpng.so.2 libpng.so.2.OLD

# Creating the symlink
ln -s libpng.so.3 libpng.so.2

# Edit language at and specify only "en_US"
pico /etc/sysconfig/i18n

# Restarting MRTG
service mrtg restart

# Configurating MRTG to allow only our local IP to see the reports at
http://IP/mrtg

pico /usr/local/apache/conf/httpd.conf

#Search for the line (CTRL+W):


# It should look like this:


Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all


#After the last line () paste this and change allowed IPs:


order deny,allow
allow from [ SERVER IP ]
allow from [YOUR LOCAL IP]
deny from all


# Restarting httpd
service httpd restart

# Let's put MRTG to start with the system
chkconfig --level 0123456 mrtg on

# Add mrtg to the up2date skip-list. If you don't do this, after system updates your MRTG will be broken.
up2date --configure
# Select the skip-list option
# Add mrtg to the skip-list
"mrtg*"

# If you have problems with Exim after MRTG is restarted, you don't have to worry about that because that mean that you don't have no mail, and MRTG takes that as an error, but if you don't want to see those error messages, you can do this:

# Edit file:
pico /etc/mrtg/check-email

# Change to "*-H" "* -H".

After this steps, your MRTG report should be available at:
http://SERVER_IP/mrtg

That's all.

Was this answer helpful?

« Back