0

I'm running mrtg on ubuntu to monitor my Cisco switches, and it works fine for one device. However, when I attempt to add a second switch, the index.html file created by mrtg only shows me information regarding the latest switch added, and not both switches together.

I use the following commands to add a new device...

cfgmaker --global 'WorkDir:/var/www/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/mrtg.cfg public@<ip address of my switch>
env LANG=C mrtg /etc/mrtg/mrtg.cfg
indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg

But whenever I add a new device this way, the /var/www/mrtg/index.html file only displays details of the last added device, not an accumulation of all devices.

Any advice greatly appreciated.

user68616
  • 33
  • 1
  • 6

1 Answers1

1

The problem you have here is that you're overwriting mrtg.cfg every single time you're running cfgmaker, if you check your mrtg.cfg you'll see that the data there is only the data related to your latest switch.

In order to overcome this problem you can do several things * Merge the mrtg files manually * Have one mrtg.cfg file per device and one directory on the web server per device, so you can use indexmaker to do each

If you want anything a bit more complicated I would strongly recommend to move up a notch and try to install cacti (http://www.cacti.net/), it'll make all this so much easier, specially if you start to manage enough devices

lynxman
  • 9,157
  • 3
  • 24
  • 28