nixos/prometheus-keylight-exporter: new module
Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
@@ -28,6 +28,7 @@ let
|
||||
"dovecot"
|
||||
"fritzbox"
|
||||
"json"
|
||||
"keylight"
|
||||
"mail"
|
||||
"mikrotik"
|
||||
"minio"
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
{ config, lib, pkgs, options }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.keylight;
|
||||
in
|
||||
{
|
||||
port = 9288;
|
||||
serviceOpts = {
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-keylight-exporter}/bin/keylight_exporter \
|
||||
-metrics.addr ${cfg.listenAddress}:${toString cfg.port} \
|
||||
${concatStringsSep " \\\n " cfg.extraFlags}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user