diff options
author | WilliButz <WilliButz@users.noreply.github.com> | 2021-05-14 14:38:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 14:38:08 +0200 |
commit | 94b2848559b12a8ed1fe433084686b2a81123c99 (patch) | |
tree | d15684acd821596f130e675052f9eb724181c229 /nixos/modules/services/monitoring | |
parent | b08e223a048022dcbaaeb82943f7c4e8e870397d (diff) | |
parent | dd7e1834ca455d9843d2b54f425ad1243322068f (diff) | |
download | nixpkgs-94b2848559b12a8ed1fe433084686b2a81123c99.tar nixpkgs-94b2848559b12a8ed1fe433084686b2a81123c99.tar.gz nixpkgs-94b2848559b12a8ed1fe433084686b2a81123c99.tar.bz2 nixpkgs-94b2848559b12a8ed1fe433084686b2a81123c99.tar.lz nixpkgs-94b2848559b12a8ed1fe433084686b2a81123c99.tar.xz nixpkgs-94b2848559b12a8ed1fe433084686b2a81123c99.tar.zst nixpkgs-94b2848559b12a8ed1fe433084686b2a81123c99.zip |
Merge pull request #91663 from mweinelt/kea-exporter
prometheus-kea-exporter: init at 0.4.1
Diffstat (limited to 'nixos/modules/services/monitoring')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/exporters.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/exporters/kea.nix | 38 |
2 files changed, 39 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index ce7c215fd14..8e8999e5155 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -34,6 +34,7 @@ let "fritzbox" "json" "jitsi" + "kea" "keylight" "knot" "lnd" diff --git a/nixos/modules/services/monitoring/prometheus/exporters/kea.nix b/nixos/modules/services/monitoring/prometheus/exporters/kea.nix new file mode 100644 index 00000000000..b6cd89c3866 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/kea.nix @@ -0,0 +1,38 @@ +{ config +, lib +, pkgs +, options +}: + +with lib; + +let + cfg = config.services.prometheus.exporters.kea; +in { + port = 9547; + extraOpts = { + controlSocketPaths = mkOption { + type = types.listOf types.str; + example = literalExample '' + [ + "/run/kea/kea-dhcp4.socket" + "/run/kea/kea-dhcp6.socket" + ] + ''; + description = '' + Paths to kea control sockets + ''; + }; + }; + serviceOpts = { + serviceConfig = { + ExecStart = '' + ${pkgs.prometheus-kea-exporter}/bin/kea-exporter \ + --address ${cfg.listenAddress} \ + --port ${toString cfg.port} \ + ${concatStringsSep " \\n" cfg.controlSocketPaths} + ''; + SupplementaryGroups = [ "kea" ]; + }; + }; +} |