1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-01 05:19:17 +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.

20 lines
472 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}
'';
};
};
}