Skip to content

xfjx/upnp2mrtg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Monitoring Fritz!Box with MRTG

http://www.anetzb.de/upnp2mrtg/

upnp2mrtg

upnp2mrtg is a add-on for the MRTG (Multi Router Traffic Grapher). upnp2mrtg is a command line tool written in shell to gather statistics from an upnp enabled FritzBox DSL router.

Features

  • WAN interface monitoring
  • LAN interface monitoring, if Fritz!Box isn't the router (see -P option)
  • uses UPNP protocoll
  • very little requirements
  • configurable
  • no Fritz!Box modifications required

Fritz!Box Devices

Modell Status Remark
3030 ok
3170 ok
5050 ok
5113 ok
7050 ok
7141 ok
7170 ok
7270 ok
7490 ok needs fix

If you have a running upnp2mrtg installation not listed here, please drop me a note! Thanks!

Contact

If you have problems, questions, ideas or suggestions, please contact me: (upnp2mrtg@ANetzB.de)

Requirements

  • UNIX style Operating System
  • bourne shell
  • nc (netcat) or bash with net-redirections enabled
  • MRTG

Installation

  • copy upnp2mrtg to your favourite place (/usr/local/bin/upnp2mrtg)

  • install netcat

  • check successful operation of upnp2mrtg

  • modify your mrtg.cfg (add mrtg.cfg to your /etc/mrtg.cfg)

  • check if MRTG is configured properly: is mrtg started from cron? check for /etc/cron.d/mrtg or use

      0-59/5 * * * *  /usr/bin/mrtg --logging /var/log/mrtg.log
    

netcat

There are different incarnations of netcat. Type

nc -h

to check which on you use:

Configuration

If you use ...

netcat 1.10

no configuration is required. (Create configuration file /etc/upnp2mrtg.cfg with NETCAT="nc_q" or NETCAT="nc", if you have problems. There are some patched netcat 1.10 around the world with -q Options, which i could'nt not find in the original sources.)

The GNU netcat

create configuration file /etc/upnp2mrtg.cfg with NETCAT="netcat".

some other netcat

use -d Option to debug upnp2mrtg and drop me a note.

Screenshot

Want to see the result?

Download

Links

Todo

  • curl for networking?
  • Implementation with Python SOAPpy?
  • uptime is not FritzBox uptime, it's online time
  • Test it, with other upnp devices
  • learn more about upnp/soap

compile bash with net-redirections enabled download http://ftp.gnu.org/gnu/bash/bash-2.05b.tar.gz

./configure --enable-net-redirections --disable-readline
make
cp bash /usr/local/bin/bash
strip /usr/local/bin/bash

About

Monitoring Fritz!Box with MRTG

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%