.gitignore | ||
Changelog.md | ||
CONTRIBUTORS.md | ||
fritzbox__connection_uptime.py | ||
fritzbox__cpu_temperature.py | ||
fritzbox__cpu_usage.py | ||
fritzbox__memory_usage.py | ||
fritzbox__power_consumption.py | ||
fritzbox__traffic_down.py | ||
fritzbox__traffic_up.py | ||
fritzbox__traffic.py | ||
fritzbox__uptime.py | ||
fritzbox__wifi_devices.py | ||
fritzbox_helper.py | ||
LICENSE | ||
README.md |
fritzbox-munin
A collection of munin plugins to monitor your AVM FRITZ!Box router. The scripts have been developed using a FRITZ!Box 7490(Amazon link) running FRITZ!OS 07.12.
If you are using the scripts on a different Fritz!Box model please let me know by
Introduction
These python scripts are Munin plugins for monitoring the Fritz!Box router by AVM.
fritzbox_traffic
fritzbox_traffic shows you the traffic of the WAN interface (requires fritzconnection)
If you do not want to show the interface maximum values, add the following to your plugin-configuration:
env.traffic_remove_max true
fritzbox_connection_uptime
fritzbox_connection_uptime shows you the connection uptime in days (requires fritzconnection)
fritzbox_cpu_usage
fritzbox_cpu_usage shows you the cpu usage (requires password)
fritzbox_cpu_temperature
fritzbox_cpu_temperature shows you the cpu temperature (requires password)
fritzbox_memory_usage
fritzbox_memory_usage shows you the memory usage (requires password)
fritzbox_power_consumption
fritzbox_power_consumption shows you the power consumption (requires password)
fritzbox_uptime
fritzbox_uptime shows you the uptime in days (requires password) (language dependant, see below).
fritzbox_wifi_devices
fritzbox_wifi_devices shows you the number of connected wifi clients (requires password) (language dependant, see below).
Installation & Configuration
-
Pre-requesites for the fritzbox_traffic and fritzbox_uptime plugins are the fritzconnection and requests package. To install it
pip install fritzconnection pip install lxml
-
Make sure the FritzBox has UPnP status information enabled. (German interface: Heimnetz > Heimnetzübersicht > Netzwerkeinstellungen > Statusinformationen über UPnP übertragen)
-
Copy all the scripts (*.py) to
/usr/share/munin/plugins
-
Make all the scripts execute able (chmod 755 /usr/share/munin/plugins.*py)
-
Create entry in
/etc/munin/plugin-conf.d/munin-node
:-
only one fritzbox or all fritzboxes use the same password:
[fritzbox_*] env.fritzbox_password <fritzbox_password> env.traffic_remove_max true # if you do not want the possible max values
-
multiple fritzboxes:
[fritzbox_<fqdn1>_*] env.fritzbox_password <fritzbox_password> env.traffic_remove_max true # if you do not want the possible max values [fritzbox_<fqdn2>_*] env.fritzbox_password <fritzbox_password> env.traffic_remove_max true # if you do not want the possible max values
-
-
Create symbolic link in
/etc/munin/plugins
forfritzbox_helper.py
.cd /etc/munin/plugins ln -d /usr/share/munin/plugins/fritzbox_helper.py fritzbox_helper.py
-
Create symbolic link in
/etc/munin/plugins
for probes.link `/usr/share/munin/plugins/fritzbox__<probe>.py` to `fritzbox_<fqdn>_<probe>` example cd /etc/munin/plugins ln -d /usr/share/munin/plugins/fritzbox__cpu_usage.py fritzbox_fritz.box_cpu_usage ln -d /usr/share/munin/plugins/fritzbox__cpu_temperature.py fritzbox_fritz.box_cpu_temperature ... if you have multiple fritz box just create multiple sets of links with a different fqdn or ip. example cd /etc/munin/plugins ln -d /usr/share/munin/plugins/fritzbox__cpu_usage.py fritzbox_fritz.box_cpu_usage ln -d /usr/share/munin/plugins/fritzbox__cpu_usage.py fritzbox_box2.fritz.box_cpu_usage ln -d /usr/share/munin/plugins/fritzbox__cpu_usage.py fritzbox_192.168.100.1_cpu_usage ln -d /usr/share/munin/plugins/fritzbox__cpu_temperature.py fritzbox_box2.fritz.box_cpu_temperature ln -d /usr/share/munin/plugins/fritzbox__cpu_temperature.py fritzbox_box2.fritz.box_cpu_temperature ln -d /usr/share/munin/plugins/fritzbox__cpu_temperature.py fritzbox_192.168.100.1_cpu_temperature ...
-
Restart the munin-node daemon:
systemctl restart munin-node
. -
Done. You should now start to see the charts on the Munin pages.
Localization
Two scripts depend on the language selected in your fritzbox: the uptime and wifi_devices. Currently, two locales are supported:
- German:
de
(default) - English:
en
You can change the used locale by setting an environment variable in your plugin configuration:
env.locale en
Set a group for your fritzboxes
You can group the graphs of your fritzbox:
-
Use the following as your host configuration in
/etc/munin/munin.conf
or by creating a file in/etc/munin/munin-conf.d
[<groupname>;<fqdn>] address 127.0.0.1 use_node_name no example: [Network;fritz.box] address 127.0.0.1 use_node_name no
-
Restart your munin-node:
systemctl restart munin-node
Environment Settings
Do not forget to restart the munin-node daemon as described in step 3 of the installation instructions above.