Update/Setup MRTG (ubuntu)

If you’re running an MRTG server on Ubuntu, you may need to update it occasionally when new interfaces/routers are added.

  1. Stop the Service

    sudo /etc/init.d/mrtg stop

  2. Move the current config just in case something goes wrong

    sudo mv /etc/mrtg/mrtg.cfg /etc/mrtg/mrtg.cfg.old

  3. Make the configuration (I’m connecting to 3 devices)

    sudo cfgmaker –output=/etc/mrtg/mrtg.cfg sinatra@10.0.150.1 sinatra@10.0.150.254 sinatra@10.0.155.2

  4. Edit the config to run as a daemon

    sudo vi /etc/mrtg/mrtg.cfg

    Options[_]: growright, bits
    RunAsDaemon: Yes
    Interval: 5
    Logdir: /var/log/

  5. Start the process

    sudo /etc/init.d/mrtg start

  6. Create the index file

    sudo indexmaker –output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg


Leave a Reply

There aren't any comments at the moment, be the first to start the discussion!