Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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 (, it'll make all this so much easier, specially if you start to manage enough devices

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.