2024-03-21 05:26:03 +01:00
|
|
|
{ config, lib, pkgs, options, ... }:
|
2020-06-18 07:46:52 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.prometheus.exporters.redis;
|
2024-04-24 14:41:17 -04:00
|
|
|
inherit (lib) concatStringsSep;
|
2020-06-18 07:46:52 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
port = 9121;
|
|
|
|
serviceOpts = {
|
|
|
|
serviceConfig = {
|
2024-04-15 09:23:54 +02:00
|
|
|
RestrictAddressFamilies = [ "AF_UNIX" ];
|
2020-06-18 07:46:52 +02:00
|
|
|
ExecStart = ''
|
|
|
|
${pkgs.prometheus-redis-exporter}/bin/redis_exporter \
|
|
|
|
-web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
|
|
|
|
${concatStringsSep " \\\n " cfg.extraFlags}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|