All Projects → blackw1ng → FritzBox-monitor

blackw1ng / FritzBox-monitor

Licence: MIT license
Monitor FritzBox metrics via a telegraf/influxdb/grafana stack that reads data from TR-064

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to FritzBox-monitor

modfs
modify firmware for NAND-flash based FRITZ!Box routers and install it on such a device
Stars: ✭ 49 (-12.5%)
Mutual labels:  fritzbox
homebridge-callmonitor
Signals incoming and outgoing calls using the call monitor facility in Fritz!Box devices via HomeKit
Stars: ✭ 25 (-55.36%)
Mutual labels:  fritzbox
docker-speedtest-influxdb
Speedtest results to InfluxDB for Grafana
Stars: ✭ 20 (-64.29%)
Mutual labels:  grafana-dashboard
HomeApp
A little smart home app for Philips Hue and other devices
Stars: ✭ 54 (-3.57%)
Mutual labels:  fritzbox
gitana
Gitana is a lightweight dashboard sync
Stars: ✭ 61 (+8.93%)
Mutual labels:  grafana-dashboard
netdata-influx
Netdata ➡️ InfluxDB metrics exporter & Grafana dashboard
Stars: ✭ 29 (-48.21%)
Mutual labels:  grafana-dashboard
Pagerbeauty
📟✨ PagerDuty on-call widget for monitoring dashboard. Datadog and Grafana compatible
Stars: ✭ 250 (+346.43%)
Mutual labels:  grafana-dashboard
burrow-kafka-dashboard
Kubernetes Kafka Overview, Burrow consumer lag stats, Kafka disk usage
Stars: ✭ 37 (-33.93%)
Mutual labels:  grafana-dashboard
WPA2-FritzBox-Pswd-Wordlist-Generator
This Script will produce all of the WPA2 Passwords used by various Router companies aswell as Fritzbox. All of these Passwords will be 16 Numbers in length. So it could get a bit large.
Stars: ✭ 22 (-60.71%)
Mutual labels:  fritzbox
aerospike exporter
A prometheus exporter for collecting aerospike metrics
Stars: ✭ 13 (-76.79%)
Mutual labels:  grafana-dashboard
FritzBoxShell
Some shell scripts for controlling and checking the Fritz!Box/Fritz!Repeater
Stars: ✭ 80 (+42.86%)
Mutual labels:  fritzbox
FritzBoxTelefon-dingsbums
Das Fritz!Box Telefon-dingsbums ist ein Outlook-Addin, welches ein direktes Wählen der Kontakte aus Outlook ermöglicht. Zusätzlich bietet es nützliche Funktionen, wie einen Anrufmonitor oder eine Rückwärtssuche.
Stars: ✭ 16 (-71.43%)
Mutual labels:  fritzbox
elasticsearch-monitoring
Monitor Elasticsearch clusters with Grafana dashboards (via Elasticsearch)
Stars: ✭ 25 (-55.36%)
Mutual labels:  grafana-dashboard
node-red-contrib-fritzapi
Home automation node for Fritz!Box, Fritz!DECT and FRITZ!Powerline devices.
Stars: ✭ 15 (-73.21%)
Mutual labels:  fritzbox
yearn-exporter
Realtime and historical Yearn metrics
Stars: ✭ 80 (+42.86%)
Mutual labels:  grafana-dashboard
check fritz
Check plugin written in Go to monitor a Fritz!Box
Stars: ✭ 29 (-48.21%)
Mutual labels:  fritzbox
speedtest-exporter
Speedtest Exporter made in python using the official speedtest bin
Stars: ✭ 118 (+110.71%)
Mutual labels:  grafana-dashboard
kafka-consumer-lag-monitoring
Client tool that exports the consumer lag of Kafka consumer groups to Prometheus or your terminal
Stars: ✭ 45 (-19.64%)
Mutual labels:  grafana-dashboard
idrac snmp-grafana
SNMP Based Dashboard to Monitor Dell Hosts via iDRAC
Stars: ✭ 88 (+57.14%)
Mutual labels:  grafana-dashboard
unpoller
Application: Collect ALL UniFi Controller, Site, Device & Client Data - Export to InfluxDB or Prometheus
Stars: ✭ 1,613 (+2780.36%)
Mutual labels:  grafana-dashboard

MIT license PRs Welcome made-with-python Python application

FritzBox-monitor

Monitor FritzBox metrics via a telegraf/influxdb/grafana stack that reads data from TR-064

What you get....

Grafana dashboard

  • Includes current DSL rates, possible line rates (over time)
  • Traffic on DSL line and LAN port (seems to only register LAN1 in TR-064)
  • Packets per second on WLAN, LAN and DSL
  • Clients associated in WLAN2.4 / WLAN 5 & WLAN guest
  • DECT clients, active VOIP numbers

Details

  • I decided that I want to parse the Fritzbox info via a single telegraf input.
  • Consequently, the checkfritz.py returns a json which can be easily disgested as array

Background

I have a FritzBox 7490 at home, which is connected to a vDSL 100/40 line - I was wondering regarding my traffic patterns, as well as things like connected WiFi clients, DSL line capacity and so on.

My use case

The special thing to mention is:

  • TR-064 is only accessible from the LAN (for good reasons, in terms of security)
  • My monitoring stack of influxDB etc runs on my server in Frankfurt - so the metrics need to get there safely and securely.
  • Another open port on my server, e.g. for InfluxDB etc was not deemed acceptable
  • For security considerations, I prefer a "direct pull" of metrics, e.g. by telegraf
  • So, the actual monitoring collector needs from a decoy host in the LAN, namely my diskstation or one of the raspis
  • I did not want to run an ssh command for every value
  • LAN hosts can be securely / directly accessed by IPv6, and thanks to DNS updates, also carry AAAA entries.

References

I started looking around, and found a good number of projects and descriptions, on how to do it...

All of those needed quite some extra work, or did not fit my use case directly... FritzBoxShell did not completely fetch all the information available, as described by https://avm.de/service/schnittstellen/, and the scripts provided with fritzconnection did need modification as well, the collectd plugin (based on FritzConnection) requires an collectd somewhere in LAN - and an accessible sink.

Installation

Pre-requisites

FritzBox

Diskstation extras

  • Have a Python 3 installation (install Python package) and fritzconnection running (this is quite a task):
    • Install opkg as your package manager, probably best via EasyBootstrapInstaller (see: https://community.synology.com/enu/forum/1/post/127148 )
    • Have "python3-pip" and "python3-lxml" (to tackle the TR-064 SOAP) ready and installed (either installed via opkg, or via pip-bootstrap - have fun getting lxml running on the diskstation without opkg... as the headers are missing)
    • Make sure you have the fritzconnection module: pip install fritzconnections
  • Create a monitoring user via web-ui, have this one be an admin user (otherwise ssh-login does not work)
  • Add your monitoring servers telegraf ssh key to ~monitoring/.ssh/authorized_keys

Monitoring server (in the internet)

  • Have a recent telegraf installation running
  • Have the local output configured, e.g. [[outputs.influxdb]]
  • Have grafana ready, to be able to read from said output
  • Configure telegraf to be able to ssh out with key-auth
    • Create an ssh-key for ~telegraf , probably in /etc/telegraf/.ssh/id_rsa without passphrase, so it can be called from telegraf directly.
    • Check whether telegraf can log in to your diskstation (in the LAN) via keyauth

Actual installation

  • Copy checkfritz.py to your decoy host
    • Adjust credentials
    • Check it is executable & works: Log in to decoy host as the user, and ./checkfritz.py
  • Integrate telegraf-fritzbox.conf into server grafana installation
    • Test the config: telegraf --filter inputs.exec --test
    • Restart grafana, and start collecting data
  • Add grafana-fritzbox-dashboard.json to your server grafana installation
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].