# change it from $ cfgmaker --global 'WorkDir:/var/www/html/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/mrtg.cfg public@192.168.1.253 # to $ cfgmaker --global 'WorkDir:/var/www/html/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/conf.d/192.168.1.253.cfg public@192.168.1.253 # and then on your next one you add $ cfgmaker --global 'WorkDir:/var/www/html/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/conf.d/192.168.2.253.cfg public@192.168.2.253 • • install mrtg. # note 192.168.1.253 is your router's ip $ sudo cfgmaker --output=/etc/mrtg/mrtg.cfg public@192.168.1.253 # two or more router $ sudo cfgmaker --output=/etc/mrtg/mrtg.cfg public@192.168.1.253 public@192.168.2.253 # uncomment $ sudo pico /etc/mrtg/mrtg.cfg. # under debian WorkDir: /var/www/mrtg. # under global defaults Options[_]: growright, bits. # under EnableIPv6: no # of global defaults RunAsDaemon: Yes Interval: 5 # this means that every 5 minutes # mrtg will poll the snmp service # in your gateway/router and update its graphs # by default mrtg graphs grow to the left # so by adding `growright` will flips the graphs # `bits` means that the monitored traffice values # obtained from gateway/router are multiplied by 8 # displayed bits/s instead of bytes/s • create web page. Create page $ sudo mkdir /var/www/mrtg $ sudo indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg # 2.
Config apache2 $ sudo pico /etc/apache2/apache.conf. Alias /mrtg '/var/www/mrtg/' Options None AllowOverride None Require all granted # 3. Restart apache $ sudo service apache2 restart # 4. Fix `.reliably determine the server's fully qualified domain name.` # add following line to $ sudo pico /etc/apache2/apache.conf. ServerName localhost:80 • start.
(20161025 – The software versions used in this post were updated — iceflatline) (20150902 – The steps and script in this post were amended to remove logging — iceflatline) This post will describe how to install and configure (Multi Router Traffic Grapher) on your Ubuntu server. Astrology Software Vedic Mathematics on this page. All steps assume that the Apache http server is installed and operating correctly. Once configured, you’ll be able to use MRTG to monitor the traffic in and out of your network using the SNMP capability in your network’s gateway router. MRTG generates static HTML pages containing PNG images which provide a visual representation of this traffic.
MRTG typically produces daily, weekly, monthly, and yearly graphs. MRTG is written in perl and works on Unix/Linux as well as Windows. MRTG is free software licensed under the GNU GPL.
In a previous post I described how to install and configure Tobi Oetiker’s MRTG (Multi Router Traffic Grapher) on a Ubuntu server. In this post I will describe how.
Software versions used in this post were as follows:• Ubuntu Server v16.04.1 x64 LTS) • mrtg v2.17.4-3ubuntu1 So, let’s get started. Download and Install First, update your package list. Sudo mkdir / etc / mrtg && sudo mv / etc / mrtg. Cfg / etc / mrtg That’s it for installing MRTG. Now let’s move on and configure it. Configure MRTG includes a script called cfgmaker that will help us populate /etc/mrtg/mrtg.cfg with the information obtained from your gateway router. But before you run cfgmaker, you should setup the SNMP service in your gateway router.