Академический Документы
Профессиональный Документы
Культура Документы
MRTG
techrepublic.com/article/how-to-monitor-snmp-traffic-on-ubuntu-for-free-with-mrtg/
If you're looking for a free, reliable way to monitor SNMP traffic on your network, see
how to get Multi Router Traffic Grabber up and running on a Ubuntu Server.
Multi Router Traffic Grapher (MRTG) is a great way to monitor SNMP traffic on your
network. It's a free tool, and it's fairly simple to install. By monitoring
daily/weekly/monthly/yearly traffic going in and out of your network, you can get a very
good snapshot of how much traffic your network sees and what times of the
day/week/month/year it spikes.
MRTG is available for Linux/UNIX and Windows. I'll walk you through the steps of
installing this system on a Ubuntu 16.04 Server platform. The entire process is done via
the command line, but it isn't terribly challenging. Once complete, you'll have easy-to-
read graphs that display your network SNMP traffic.
Beyond the actual server, the first thing you must do is install a couple of dependencies.
Open your terminal window and issue the command:
Once that installs, the /etc/snmp/snmpd.conf needs to be edited. Open that file in your
text editor of choice and change the line:
to
Installing MRTG
The MRTG software can be installed with a single command. From the terminal window,
issue the following:
During the installation, you'll be prompted to change the ownership of the configuration
file so it is only readable by the root user. When prompted (Figure A), tab to Yes and hit
Enter on the keyboard.
Figure A
2/5
Setting the proper privileges for the configuration file.
Now back up the original MRTG config file with the command:
Open the /etc/mrtg.cfg file for editing and look to make sure the WorkDir line is set to:
WorkDir: /var/www/mrtg
Now we make use of the cfgmaker tool to rebuild the configuration file with the
command:
Next we have to create a sites-available file. Issue the command sudo nano
/etc/apache2/sites-available/mrtg.conf and then add the following to this new file:
3/5
Alias /mrtg "/var/www/mrtg/"
<Directory "/var/www/mrtg/">
Options None
AllowOverride None
Require all granted
</Directory>
Save and close that file. Enable the new site with the command sudo a2ensite mrtg and
then restart Apache with the command sudo service apache2 reload. Once Apache
reloads, you can point a web browser to http://IP_OF_SERVER/mrtg (IP_OF_SERVER is the
actual IP address of your MRTG server) to see the MRTG page (Figure B).
Figure B
MRTG is now monitoring all incoming and outgoing SNMP traffic on your network. As
long as that server is up and running, MRTG will do its thing.
4/5
An outstanding tool
MRTG is a very reliable way to keep track of network statistics for your business. It's
cheap, easy to install, and works like a champ. Get it up and running, and let it keep track
of your networks' comings and goings.
5/5