A Prometheus exporter for AVM Fritz!Box and related devices.
100K+
This is a prometheus exporter for AVM Fritz! home network devices commonly found in Europe. This exporter uses the devices builtin TR-064 API via the fritzconnection python module.
The exporter should work with Fritz!Box and Fritz!Repeater Devices (and maybe others). It actively checks for supported metrics and queries the for all devices configured (Yes, it has multi-device support for all you Mesh users out there.)
It has been tested against an AVM Fritz!Box 7590 (DSL), a Fritz!Repeater 2400 and a Fritz!WLAN Repeater 1750E. If you have another box and data is missing, please file an issue or PR on GitHub.
The following groups of metrics are currently available:
There is code in fritzexporter/fritzcapabilities.py to extract information about ever single host the device knows about but it is completely disabled as of now as polling the information can take 20-30 seconds depending on your network setup. If you want to test this out simply uncomment that code and rebuild the docker image.
If there is any information missing or not displayed on your specific device, please open an issue.
Fatal Python error: init_interp_main: can't initialize time when running the container you may have to update libseccomp on your Docker host. This issue mainly happens on Raspberry Pi and is triggered by a version of libseccomp2 which is too old. See https://askubuntu.com/questions/1263284/apt-update-throws-signature-error-in-ubuntu-20-04-container-on-arm (Method 2) and https://github.com/pdreker/fritzbox_exporter/issues/38.There is a simple Grafana dashboard avaliable at https://grafana.com/grafana/dashboards/13983
There is a (rather crude) Helm chart under docs/helm in the repository. It will deploy the exporter and also create a service monitor for Prometheus Operator to automatically scrape the exporter.
Version 2.0.0 changes the direction labels of some metrics to consistently use tx (transmitted, upstream) and rx (received, downstream). Before this change the labels were up and down respectively, while other metrics used txand rx.
Affected metrics:
Multi device configuration was dropped from the environment configuration. The FRITZ_EXPORTER_CONFIG environment variable was removed completely. When using environment configuration this exporter now only supports a single device. For multi device support please use the new config file option.
All WiFi metrics have been merged. So e.g. fritz_wifi_2_4GHz_* is changed to fritz_wifi_* and two labels (wifi_index and wifi_name) are added to the metrics.
Version 1.0.0 of the exporter has completely reworked how this exports metrics! If you have used this exporter in the past, you will get a completely new set of metrics.
fritzbox_ to fritz_Serial -> serial) to be in line with the common usage of labelsIf your device delivers some metrics which are not yet scraped by this exporter you can either create a Pull Request, which will be gladly accepted ;-)
Alternatively you can use the following commands and the litlle helper script in the root of this repository to let me know of metrics:
fritzconnection -i <FRITZ-IP> -s # Lists available services
fritzconnection -i <FRITZ-IP> -S <ServiceName> # Lists available action for a service
python -m fritz_export_helper <FRITZ-IP> <USERNAME> <PASSWORD> <ServiceName> <ActionName> # Will output the data returned from the device in a readable format
If you have found something you need/want, open an issue provide the following infos:
Fritz! and AVM are registered trademarks of AVM GmbH. This project is not associated with AVM or Fritz other than using the devices and their names to refer to them.
Copyright 2019-2022 Patrick Dreker [email protected]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Content type
Image
Digest
sha256:6cea5c7b9…
Size
21.8 MB
Last updated
about 1 hour ago
docker pull pdreker/fritz_exporter