Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
options,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.services.prometheus.exporters.lnd;
|
|
inherit (lib) mkOption types concatStringsSep;
|
|
in
|
|
{
|
|
port = 9092;
|
|
extraOpts = {
|
|
lndHost = mkOption {
|
|
type = types.str;
|
|
default = "localhost:10009";
|
|
description = ''
|
|
lnd instance gRPC address:port.
|
|
'';
|
|
};
|
|
|
|
lndTlsPath = mkOption {
|
|
type = types.path;
|
|
description = ''
|
|
Path to lnd TLS certificate.
|
|
'';
|
|
};
|
|
|
|
lndMacaroonDir = mkOption {
|
|
type = types.path;
|
|
description = ''
|
|
Path to lnd macaroons.
|
|
'';
|
|
};
|
|
};
|
|
serviceOpts.serviceConfig = {
|
|
ExecStart = ''
|
|
${pkgs.prometheus-lnd-exporter}/bin/lndmon \
|
|
--prometheus.listenaddr=${cfg.listenAddress}:${toString cfg.port} \
|
|
--prometheus.logdir=/var/log/prometheus-lnd-exporter \
|
|
--lnd.host=${cfg.lndHost} \
|
|
--lnd.tlspath=${cfg.lndTlsPath} \
|
|
--lnd.macaroondir=${cfg.lndMacaroonDir} \
|
|
${concatStringsSep " \\\n " cfg.extraFlags}
|
|
'';
|
|
LogsDirectory = "prometheus-lnd-exporter";
|
|
ReadOnlyPaths = [
|
|
cfg.lndTlsPath
|
|
cfg.lndMacaroonDir
|
|
];
|
|
};
|
|
}
|