github twitter
SNMP and MRTG: Ubiquiti Edgerouter Lite and Ubuntu Server
Nov 8, 2014
One minute read

Enable the SNMP agent on Edgerouter Lite:

EdgeOS screenshot

Install and configure SNMP:

aptitude install snmp

Install the full set of IETF MIBs:

sudo apt-get install snmp-mibs-downloader
sudo download-mibs

Enable mibs in /etc/snmp/snmp.conf by commenting out this line

mibs :

Install and configure MRTG and Apache:

aptitude install apache2 snmpd mrtg
cp /etc/mrtg.cfg /etc/mrtg.cfg.backup
cfgmaker <SNMP COMMUNITY NAME>@<NETWORK DEVICE IP ADDRESS> > /etc/mrtg.cfg
mkdir /var/www/mrtg
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

To point apache at /var/www/mrtg/ where MRTG is putting its files, update /etc/apache2/sites-available/000-default.conf

from

DocumentRoot /var/www/html

to

DocumentRoot /var/www

If you want the graphs to be in bits instead of bytes and grow from left to right instead of right to left, uncomment this line in /etc/mrtg.cfg

Options[_]: growright, bits

Finally, reboot the server and navigate to http://<server IP>/mrtg/.

mrtg screenshot

mrtg screenshot


Back to posts


comments powered by Disqus