nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/redis.nix

20 lines
397 B
Nix
Raw Normal View History

2020-06-18 06:46:52 +01:00
{ config, lib, pkgs, options }:
with lib;
let
cfg = config.services.prometheus.exporters.redis;
in
{
port = 9121;
serviceOpts = {
serviceConfig = {
ExecStart = ''
${pkgs.prometheus-redis-exporter}/bin/redis_exporter \
-web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
};
};
}