{"id":37846632,"url":"https://github.com/fgrosse/fritz-mon","last_synced_at":"2026-01-16T16:03:53.847Z","repository":{"id":57620610,"uuid":"264420199","full_name":"fgrosse/fritz-mon","owner":"fgrosse","description":"Prometheus exporter for Fritz!Box metrics","archived":false,"fork":false,"pushed_at":"2020-05-16T12:48:26.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T22:38:31.647Z","etag":null,"topics":["fritzbox","prometheus","prometheus-exporter","prometheus-metrics","raspberry-pi"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fgrosse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-16T11:17:27.000Z","updated_at":"2024-04-13T13:38:10.000Z","dependencies_parsed_at":"2022-09-02T16:35:55.950Z","dependency_job_id":null,"html_url":"https://github.com/fgrosse/fritz-mon","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fgrosse/fritz-mon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrosse%2Ffritz-mon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrosse%2Ffritz-mon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrosse%2Ffritz-mon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrosse%2Ffritz-mon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgrosse","download_url":"https://codeload.github.com/fgrosse/fritz-mon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrosse%2Ffritz-mon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fritzbox","prometheus","prometheus-exporter","prometheus-metrics","raspberry-pi"],"created_at":"2026-01-16T16:03:53.755Z","updated_at":"2026-01-16T16:03:53.831Z","avatar_url":"https://github.com/fgrosse.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fritz-mon\n\n![Build Status](https://github.com/fgrosse/fritz-mon/workflows/Build/badge.svg)\n[![License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://github.com/fgrosse/fritz-mon/blob/master/LICENSE)\n\nExport various metrics from the AVM FRITZ!Box API as Prometheus metric.\n\n### Usage\n\n```shell\n# Cross compile and upload to your raspberry:\n$ GOARCH=arm64 go build \u0026\u0026 scp fritz-mon raspberry:/usr/local/bin/fritz-mon\nfritz-mon                                                    100% 12MB   9.4MB/s   00:01\n\n# Log into your Pi:\n$ ssh raspberry\n\n# Setup initial configuration (requires existing user at FRITZ!Box)\nfritz-mon -setup\n…\n\n# Run it:\n$ fritz-mon -config=/etc/fritz-mon.yml -debug\n2020-01-04T18:00:24.289+0100\tINFO\tLoading configuration file\t{\"path\": \"/etc/fritz-mon.yml\"}\n2020-01-04T18:00:24.289+0100\tINFO\tStarting FRITZ!Box monitoring server\t{\"listen_addr\": \"localhost:4000\", \"fritzbox\": \"http://fritz.box\", \"monitoring_interval\": \"5m0s\"}\n2020-01-04T18:00:25.290+0100\tDEBUG\tFetching metrics from FRITZ!Box API\n2020-01-04T18:00:25.290+0100\tDEBUG\tRequesting list of devices\n2020-01-04T18:00:25.432+0100\tDEBUG\tAuthenticating new session at FRITZ!Box API\t{\"base_url\": \"http://fritz.box\"}\n2020-01-04T18:00:25.772+0100\tDEBUG\tCollected device metrics\t{\"device_name\": \"Lichterkette Balkon\", \"energy_watt_hours_total\": 129, \"is_connected\": 1, \"is_powered\": 1, \"power_watts\": 2.77, \"temperature_celsius\": 0.5, \"voltage_volt\": 228.916}\n…\n```\n\n### Collected Metrics\n\nCurrently, the following metrics are collected:\n\n| Name                                              | Description                                                                      |\n|---------------------------------------------------|----------------------------------------------------------------------------------|\n| `fritzbox_home_automation_device_connected_bool`  | Either 0 or 1 to indicate if the device is currently connected to the FRITZ!Box. |\n| `fritzbox_home_automation_is_powered_bool`        | Either 0 or 1 to indicate if the device is powered on or off.                    |\n| `fritzbox_home_automation_temperature_celsius`    | Temperature measured at the device sensor in degree Celsius.                     |\n| `fritzbox_home_automation_power_watts`            | Electric power in Watt.                                                          |\n| `fritzbox_home_automation_voltage_volts`          | Electric voltage in Volt.                                                        |\n| `fritzbox_home_automation_energy_watthours_total` | Accumulated power consumption in Watt hours since initial setup.                 |\n\n#### Notes\n\nAll metrics are collected with a `device_name` label. The FRITZ!Box and their\ndevices refresh some of the metrics only about every 2 minutes so it does not\nmake a lot of sense setting a more granular scraping interval in Prometheus for\nthis service. \n\n### Systemd\n\nOnce you get the program working you can set it up in a more permanent way by\nusing the provided [`systemd/fritz-mon.service`](systemd/fritz-mon.service) file\nto install the cross compiled binary as simple systemd service into your\nRaspberry Pi like this:\n\n```shell\n# Upload systemd unit file:\n$ scp systemd/fritz-mon.service raspberry:/etc/systemd/system/fritz-mon.service\n\n# Log into your Pi:\n$ ssh raspberry\n\n# Enable service to start on boot:\n$ systemctl enable fritz-mon.service\n\n# Start fritz-mon service now:\n$ systemctl start fritz-mon\n\n# Check its running:\n$ systemctl status fritz-mon\n● fritz-mon.service - FRITZ!Box Monitoring Service\n   Loaded: loaded (/etc/systemd/system/fritz-mon.service; enabled; vendor preset: enabled)\n   Active: active (running) since Sat 2020-01-04 19:47:14 CET; 4s ago\n Main PID: 28951 (fritz-mon)\n   Memory: 932.0K\n   CGroup: /system.slice/fritz-mon.service\n           └─28951 /usr/local/bin/fritz-mon -config=/etc/fritz-mon.yml\n\nJan 04 19:47:14 systemd[1]: Started FRITZ!Box Monitoring Service.\nJan 04 19:47:14 fritz-mon[28951]: 2020-01-04T19:47:14.978+0100        INFO        Loading configuration file        {\"path\": \"/etc/fritz-mon.yml\"}\nJan 04 19:47:14 fritz-mon[28951]: 2020-01-04T19:47:14.988+0100        INFO        Starting FRITZ!Box monitoring server        {\"listen_addr\": \"localhost:3000\", \"fritzbox\": \"http://fritz.box\", \"monitoring_interval\": \"5m0s\"}\nJan 04 19:47:14 fritz-mon[28951]: 2020-01-04T19:47:14.990+0100        INFO        If you want to see more verbose log run with -debug\n```\n\nThere are also some additional systemd unit files to setup Grafana and Prometheus.\n\n### License\n\n© Friedrich Große 2020, distributed under [BSD-3-Clause License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgrosse%2Ffritz-mon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgrosse%2Ffritz-mon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgrosse%2Ffritz-mon/lists"}