mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-28 08:07:24 +03:00
nixos/prometheus-kea-exporter: init
This commit is contained in:
parent
7944ea7b66
commit
bc4a80979b
@ -34,6 +34,7 @@ let
|
|||||||
"fritzbox"
|
"fritzbox"
|
||||||
"json"
|
"json"
|
||||||
"jitsi"
|
"jitsi"
|
||||||
|
"kea"
|
||||||
"keylight"
|
"keylight"
|
||||||
"knot"
|
"knot"
|
||||||
"lnd"
|
"lnd"
|
||||||
|
@ -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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user