Compare commits

..

No commits in common. "41da6fe13fb78e3a70e2d81c6d316ba63eb6263e" and "286c5237e9b953d732260e711e6fa3e9ec2790ff" have entirely different histories.

6 changed files with 46 additions and 1 deletions

View File

@ -5,9 +5,11 @@
../../modules
../../users/simon
./services/fritzbox-exporter.nix
./services/media-backup.nix
./services/media.nix
./services/torrent.nix
./services/wordclock-dimmer.nix
];
sbruder = {

View File

@ -0,0 +1,9 @@
{ config, ... }:
{
services.prometheus.exporters.fritzbox = {
enable = true;
gatewayAddress = "192.168.100.1";
listenAddress = config.sbruder.wireguard.home.address;
};
}

View File

@ -23,7 +23,6 @@
./services/psycho-power-papagei.de
./services/sbruder.xyz
./services/schabernack.nix
./services/wordclock-dimmer.nix
];
sbruder = {

View File

@ -80,6 +80,10 @@ in
regex = "(.*)\\.vpn\\.sbruder\\.de:9561";
};
}
{
job_name = "fritzbox";
static_configs = mkStaticTarget "fuuko.vpn.sbruder.de:9133";
}
(
let
listenerCfg = (lib.elemAt config.services.matrix-synapse.settings.listeners 0);
@ -152,6 +156,9 @@ in
];
};
# get rid of “could not call action: authorization required” every scrape
systemd.services.prometheus-fritzbox-exporter.serviceConfig.StandardOutput = "null";
# exporters that are not part of nixpkgs prometheus infrastructure
services.hcloud_exporter = {
enable = true;

View File

@ -0,0 +1,28 @@
{ lib, stdenv, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "fritzbox-exporter";
version = "unstable-2021-03-03";
rev = "6d66f6b8e47878c61feb710e36306fe714350658";
src = fetchFromGitHub {
inherit rev;
owner = "mxschmitt";
repo = "fritzbox_exporter";
sha256 = "0n9fwslcwgfghscrwbz7p3zamb474zk425ijkkh6cixpnc7p3vi6";
};
subPackages = [ "cmd/exporter" ];
vendorSha256 = "0k6bd052pjfg5c1ba1yhni8msv3wl512vfzy2hrk49jibh8h052n";
passthru.tests = { inherit (nixosTests.prometheus-exporters) fritzbox; };
meta = with lib; {
description = "Prometheus Exporter for FRITZ!Box (TR64 and UPnP)";
homepage = "https://github.com/mxschmitt/fritzbox_exporter";
license = licenses.asl20;
maintainers = with maintainers; [ bachp flokli ];
platforms = platforms.unix;
};
}