Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

ng-upnp2mrtg - (c) 2009-2017 by Michael Strecke

released under GPL v3.0


ng-upnp2mrtg3 is a small python script to retrieve data from UPNP enabled routers and hand it over to MRTG.

  • The current version is running under Python3.
  • The old Python2 version is still available but not recommended.

Supported devices

  • NetCologne Premium (a re-branded Sphairon Turbolink 7211)
  • Fritzbox 7490
  • Tp-Link Archer C7


  • Python 3.1 or 2.5 resp.
  • standard libraries only


  • Copy the script to a directory of your choice.
  • Modify the MRTG configuration file accordingly.

USAGE is usually called via mrtg. An example mrtg configuration file is included. Compare with /etc/mrtg.cfg on your system.

CONFIGURATION itself is configured using command line options:

--host, -h - IP address or host name of the UPNP device (default:

--port, -p - UPNP port of the device (default: 49300)

--type, -t - type of router (mandatory) (see --list option below)

--nowrap filename - activates the anti-wrap option. Modems tend to reset their byte counts after a disconnect which shows up as a huge spike in the MRTG graph. To counter this, keeps track of the byte count and adds the last byte count before the reset as an offset to all subsequent results. This information is stored in filename

--rawlog filename - the raw byte counts can be logged in filename for debugging purposes.

--debug - outputs even more debugging information (to stdout). This option must not be used if the script is called via MRTG.

--help - short help

--list - displays a list of supported routers. The values in the first column are used in the -t option.

OTHER UPNP DEVICES can be easily extended. See Wiki or for further information.


ng-upnp2mrtg retrieves data from UPNP enabled routers and hand it over to MRTG



No releases published


No packages published