about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/prometheus-exporters.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-06 17:31:51 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-10 07:13:25 +0000
commit1cdc42df888dc98c347e03bd942ed9825a55bcb3 (patch)
tree27aa457536e906712e4075a137af20510df8299d /nixpkgs/nixos/tests/prometheus-exporters.nix
parentf0205a49b465ab0e99502d2af4314526a1f90909 (diff)
parent1b8af3e1ae75df048fbdfb3acf6842f13de3e38f (diff)
downloadnixlib-1cdc42df888dc98c347e03bd942ed9825a55bcb3.tar
nixlib-1cdc42df888dc98c347e03bd942ed9825a55bcb3.tar.gz
nixlib-1cdc42df888dc98c347e03bd942ed9825a55bcb3.tar.bz2
nixlib-1cdc42df888dc98c347e03bd942ed9825a55bcb3.tar.lz
nixlib-1cdc42df888dc98c347e03bd942ed9825a55bcb3.tar.xz
nixlib-1cdc42df888dc98c347e03bd942ed9825a55bcb3.tar.zst
nixlib-1cdc42df888dc98c347e03bd942ed9825a55bcb3.zip
Merge commit '1b8af3e1ae75df048fbdfb3acf6842f13de3e38f'
Diffstat (limited to 'nixpkgs/nixos/tests/prometheus-exporters.nix')
-rw-r--r--nixpkgs/nixos/tests/prometheus-exporters.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/nixpkgs/nixos/tests/prometheus-exporters.nix b/nixpkgs/nixos/tests/prometheus-exporters.nix
index 4dbd64312224..75c4ca12db24 100644
--- a/nixpkgs/nixos/tests/prometheus-exporters.nix
+++ b/nixpkgs/nixos/tests/prometheus-exporters.nix
@@ -475,6 +475,20 @@ let
       '';
     };
 
+    redis = {
+      exporterConfig = {
+        enable = true;
+      };
+      metricProvider.services.redis.enable = true;
+      exporterTest = ''
+        wait_for_unit("redis.service")
+        wait_for_unit("prometheus-redis-exporter.service")
+        wait_for_open_port(6379)
+        wait_for_open_port(9121)
+        wait_until_succeeds("curl -sSf localhost:9121/metrics | grep -q 'redis_up 1'")
+      '';
+    };
+
     rspamd = {
       exporterConfig = {
         enable = true;