0% found this document useful (0 votes)
63 views1 page

MRTG Configuration

The document provides instructions for installing and configuring MRTG (Multi Router Traffic Grapher) on a system. It describes downloading required packages, configuring SNMP, generating an MRTG configuration file, editing the configuration file, running MRTG to generate graphs, creating an index HTML file, configuring the Apache server to serve the MRTG files, restarting Apache, and setting up a cron job to regularly run MRTG.

Uploaded by

Sudheesh Mp
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views1 page

MRTG Configuration

The document provides instructions for installing and configuring MRTG (Multi Router Traffic Grapher) on a system. It describes downloading required packages, configuring SNMP, generating an MRTG configuration file, editing the configuration file, running MRTG to generate graphs, creating an index HTML file, configuring the Apache server to serve the MRTG files, restarting Apache, and setting up a cron job to regularly run MRTG.

Uploaded by

Sudheesh Mp
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Required packages

mrtg-2.10.15-1.i386.rpm
net-snmp
net-snmp-utils

Prerequisite: snmp should be configured and running


Change the permissions of the directory

                #chmod 777 /var/www/mrtg

Generate a configuration file

               #cfgmaker --output=/etc/mrtg/mrtg.cfg -ifref=ip --global


"workdir: /var/www/mrtg" --global 'options[_]: growright,bits' [email protected]
Edit the configuration file and make the necessary changes.

               #vi /etc/mrtg/mrtg.cfg

then run mrtg


               #export env LANG=C          (add this entry to /etc/profiles to export this entry
on boot time)

               #/usr/bin/mrtg /etc/mrtg/mrtg.cfg

Create an html file with the references in the configuration file

 #indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg

Edit the file and give the following contents.

              #vi /etc/httpd/conf.d/mrtg.conf

                     Alias /mrtg /var/www/mrtg


                        <Location /mrtg>
                          Order deny,allow
                        # Deny from all
                        # Allow from 127.0.0.1
                          # Allow from ::1# Allow from .example.com
                          Allow from all
                       </Location>
After modifying configuration files restart httpd service

                #service httpd restart

Then add cron job to run mrtg

                #vi /etc/cron.d/mrtg


*/5 * * * * /usr/bin/mrtg /etc/mrtg/mrtg.cfg --logging /var/log/mrtg.log

You might also like