diff options
author | Sarah Brofeldt <sarah@qtr.dk> | 2020-06-18 07:46:52 +0200 |
---|---|---|
committer | Sarah Brofeldt <sarah@qtr.dk> | 2020-06-18 11:13:25 +0200 |
commit | 344e64a4d970a180fc0bc1054cb5fd503dc1daa8 (patch) | |
tree | fdbec4cd36ea537afd783d95377df983628a293a /nixos/modules/services/monitoring/prometheus/exporters/redis.nix | |
parent | ac3a50122bb33ee72a0a243673bf2c619ec86486 (diff) | |
download | nixpkgs-344e64a4d970a180fc0bc1054cb5fd503dc1daa8.tar nixpkgs-344e64a4d970a180fc0bc1054cb5fd503dc1daa8.tar.gz nixpkgs-344e64a4d970a180fc0bc1054cb5fd503dc1daa8.tar.bz2 nixpkgs-344e64a4d970a180fc0bc1054cb5fd503dc1daa8.tar.lz nixpkgs-344e64a4d970a180fc0bc1054cb5fd503dc1daa8.tar.xz nixpkgs-344e64a4d970a180fc0bc1054cb5fd503dc1daa8.tar.zst nixpkgs-344e64a4d970a180fc0bc1054cb5fd503dc1daa8.zip |
nixos/prometheus-redis-exporter: init
Diffstat (limited to 'nixos/modules/services/monitoring/prometheus/exporters/redis.nix')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/exporters/redis.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/redis.nix b/nixos/modules/services/monitoring/prometheus/exporters/redis.nix new file mode 100644 index 00000000000..befbcb21f76 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/redis.nix @@ -0,0 +1,19 @@ +{ 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} + ''; + }; + }; +} |