0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-20 09:00:41 +03:00
nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/redis.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
482 B
Nix
Raw Normal View History

{
config,
lib,
pkgs,
options,
...
}:
2020-06-18 07:46:52 +02:00
let
cfg = config.services.prometheus.exporters.redis;
inherit (lib) concatStringsSep;
2020-06-18 07:46:52 +02:00
in
{
port = 9121;
serviceOpts = {
serviceConfig = {
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}
'';
};
};
}