How to add another switch/router with MRTG
Posted: Tue Jun 16, 2015 12:00 pm
i have followed these steps to monior bandwidth of interfaces of one cisco switch and it works fine:
but, iif i want now to add one router how can i do?, i tried to use the same steps but to the router ip and doesnt work
Code: Select all
mkdir /etc/mrtg
mv /etc/mrtg.cfg /etc/mrtg/
Now we run the cfgmaker command to get things up and running:
cfgmaker --global 'WorkDir:/var/www/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/mrtg.cfg public@<yourrouterip>
We need to make sure the following lines are correct in /etc/mrtg/mrtg.cfg If they are not there, add them.
EnableIPv6: no
RunAsDaemon: Yes
Interval: 5
Logdir: /var/log/mrtg
Now run:
indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg
Which will build the index so you can view the output.
Then I run this command to set an environmental variable
env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
and open http://localhost/mrtg/index.html