2015-06-02 23:41:15 +02:00
# fritzbox-munin
2015-12-19 11:34:21 +01:00
2018-09-11 23:15:34 +02:00
A collection of munin plugins to monitor your AVM FRITZ!Box router. The scripts have been developed using a [FRITZ!Box 7590 ](http://geni.us/OO2c7S )(Amazon link) running FRITZ!OS 7.00.
2017-06-11 22:23:29 +02:00
If you are using the scripts on a different Fritz!Box model please let me know by
2018-09-12 17:07:10 +02:00
- opening an issue
- submitting a pull request
2017-06-11 22:49:27 +02:00
So far the following models (running FRITZ!OS 06.83) have been confirmed working:
2018-09-12 17:07:10 +02:00
- [FRITZ!Box 3370 ](http://geni.us/zh3U )
- [FRITZ!Box 5490 ](http://geni.us/ACtUyFt )
- [FRITZ!Box 7362 SL ](http://geni.us/fTyoY )
- [FRITZ!Box 7390 ](http://geni.us/BlAP )
- [FRITZ!Box 7430 ](http://geni.us/BlAP )
- [FRITZ!Box 7490 ](http://geni.us/fTyoY )
- [FRITZ!Box 7560 ](http://geni.us/6gPZNI )
- [FRITZ!Box 7580 ](http://geni.us/yUYyQTE )
- [FRITZ!Box 7590 ](http://geni.us/OO2c7S )
2017-06-11 22:49:27 +02:00
If you are still running Fritz!OS 6.30 check out the [releases section ](https://github.com/Tafkas/fritzbox-munin/releases/tag/6.30.1 ).
2015-06-02 23:54:35 +02:00
## Introduction
These python scripts are [Munin ](http://munin-monitoring.org ) plugins for monitoring the [Fritz!Box ](http://avm.de/produkte/fritzbox/ ) router by AVM.
2015-06-05 00:26:57 +02:00
## fritzbox\_traffic
2015-06-02 23:54:35 +02:00
2018-09-12 17:07:10 +02:00
fritzbox\_traffic shows you the traffic of the WAN interface (requires fritzconnection)
2015-06-16 23:40:48 +02:00

2017-09-06 21:35:23 +02:00
If you do not want to show the interface maximum values, add the following to your plugin-configuration:
env.traffic_remove_max true
2018-09-12 17:07:10 +02:00
2015-06-05 09:18:06 +02:00
## fritzbox\_connection\_uptime
2015-06-04 23:05:16 +02:00
2018-09-12 17:07:10 +02:00
fritzbox\_connection\_uptime shows you the connection uptime in days (requires fritzconnection)
2015-06-16 23:40:48 +02:00

2018-09-12 17:07:10 +02:00
2015-06-04 23:05:16 +02:00
## fritzbox\_cpu\_usage
2015-06-04 22:23:00 +02:00
2018-09-12 17:07:10 +02:00
fritzbox\_cpu\_usage shows you the cpu usage (requires password)
2015-06-16 23:40:48 +02:00

2015-06-05 00:15:19 +02:00
## fritzbox\_cpu\_temperature
2018-09-12 17:07:10 +02:00
fritzbox\_cpu\_temperature shows you the cpu temperature (requires password)
2015-06-16 23:40:48 +02:00

2018-09-12 17:07:10 +02:00
2015-06-04 23:38:39 +02:00
## fritzbox\_memory\_usage
2018-09-12 17:07:10 +02:00
fritzbox\_memory\_usage shows you the memory usage (requires password)
2015-06-16 23:40:48 +02:00

2015-06-02 23:54:35 +02:00
2015-06-04 23:53:58 +02:00
## fritzbox\_power\_consumption
2018-09-12 17:07:10 +02:00
fritzbox\_power\_consumption shows you the power consumption (requires password)
2015-06-16 23:40:48 +02:00

2015-06-05 09:18:06 +02:00
## fritzbox\_uptime
2017-09-06 21:57:40 +02:00
fritzbox\_uptime shows you the uptime in days (requires password) (language dependant, see below).
2015-06-17 20:17:26 +02:00

2015-06-05 09:18:06 +02:00
## fritzbox\_wifi\_devices
2017-09-06 21:57:40 +02:00
fritzbox\_wifi\_devices shows you the number of connected wifi clients (requires password) (language dependant, see below).
2015-06-16 23:40:48 +02:00

2015-06-04 23:53:58 +02:00
2018-10-07 13:51:58 +02:00
## fritzbox\_smart\_home\_temperatures
fritzbox\_smart\_home\_temperatures show the temperature of connected smart home devices
2018-09-12 17:07:10 +02:00
## Installation & Configuration
1. Pre-requesites for the fritzbox\_traffic and fritzbox\_uptime plugins are the [fritzconnection ](https://pypi.python.org/pypi/fritzconnection ) and [requests ](https://pypi.python.org/pypi/requests ) package. To install it
2015-06-02 23:54:35 +02:00
2015-06-16 23:46:24 +02:00
pip install fritzconnection
2017-11-04 17:04:42 +01:00
pip install requests
2015-06-05 00:26:57 +02:00
2018-09-12 17:07:10 +02:00
2. Make sure the FritzBox has UPnP status information enabled. (German interface: Heimnetz > Heimnetzübersicht > Netzwerkeinstellungen > Statusinformationen über UPnP übertragen)
2017-10-13 20:29:05 +02:00
2018-09-12 17:07:10 +02:00
3. Copy all the scripts to `/usr/share/munin/plugins`
2015-06-02 23:54:35 +02:00
2018-09-12 17:07:10 +02:00
4. Create entry in `/etc/munin/plugin-conf.d/munin-node` :
2015-06-02 23:54:35 +02:00
2018-09-12 17:07:10 +02:00
[fritzbox_*]
env.fritzbox_ip < ip_address_to_your_fritzbox >
2018-10-07 14:21:13 +02:00
env.fritzbox_user < user > # if you do not specify a user authentification done by password only
2018-09-12 17:07:10 +02:00
env.fritzbox_password < fritzbox_password >
env.traffic_remove_max true # if you do not want the possible max values
host_name fritzbox
2015-06-02 23:54:35 +02:00
2018-09-12 17:07:10 +02:00
5. Create symbolic links to `/etc/munin/plugins` .
6. Restart the munin-node daemon: `/etc/init.d/munin-node restart` .
7. Done. You should now start to see the charts on the Munin pages.
2015-06-02 23:54:35 +02:00
2017-09-06 21:57:40 +02:00
## Localization
Two scripts depend on the language selected in your fritzbox: the uptime and wifi\_devices. Currently, two locales are
supported:
1. German: `de` (default)
2. English: `en`
You can change the used locale by setting an environment variable in your plugin configuration:
env.locale en
2017-09-06 21:15:13 +02:00
## Different hosts for the fritzbox and your system
You can split the graphs of your fritzbox from the localhost graphs by following the next steps:
1. Use the following as your host configuration in `/etc/munin/munin.conf`
2017-09-06 23:42:55 +02:00
[home.yourhost.net;server]
address 127.0.0.1
use_node_name yes
2018-09-12 17:07:10 +02:00
2017-09-06 23:42:55 +02:00
[home.yourhost.net;fritzbox]
address 127.0.0.1
use_node_name no
2017-09-06 21:15:13 +02:00
2. Add the following to your munin-node configuration
env.host_name fritzbox
3. Restart your munin-node: `systemctl restart munin-node`
2015-06-02 23:54:35 +02:00
## Environment Settings
2018-09-12 17:07:10 +02:00
2017-06-11 22:16:29 +02:00
Do not forget to restart the munin-node daemon as described in step 3 of the installation instructions above.