summary refs log tree commit diff
path: root/nixos/tests/prometheus-exporters.nix
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-12-19 23:16:02 +0100
committerGitHub <noreply@github.com>2022-12-19 23:16:02 +0100
commitbf46d7b626ba5ff43b60adf4297ea7d56392b0ca (patch)
treef19a0682b30ba2910015b8c7ee952142906c301d /nixos/tests/prometheus-exporters.nix
parent8a0118837cad5e741eb821ad24281400a84d4972 (diff)
parent3624f0bbf016e948f8f88d7e93f4a7d441979f13 (diff)
downloadnixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar
nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar.gz
nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar.bz2
nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar.lz
nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar.xz
nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar.zst
nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.zip
Merge pull request #172084 from priegger/prometheus-statsd-exporter
Diffstat (limited to 'nixos/tests/prometheus-exporters.nix')
-rw-r--r--nixos/tests/prometheus-exporters.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix
index 7264bd5a498..5f50a3f87d5 100644
--- a/nixos/tests/prometheus-exporters.nix
+++ b/nixos/tests/prometheus-exporters.nix
@@ -1172,6 +1172,25 @@ let
       '';
     };
 
+    statsd = {
+      exporterConfig = {
+        enable = true;
+      };
+      exporterTest = ''
+        wait_for_unit("prometheus-statsd-exporter.service")
+        wait_for_open_port(9102)
+        succeed("curl http://localhost:9102/metrics | grep 'statsd_exporter_build_info{'")
+        succeed(
+          "echo 'test.udp:1|c' > /dev/udp/localhost/9125",
+          "curl http://localhost:9102/metrics | grep 'test_udp 1'",
+        )
+        succeed(
+          "echo 'test.tcp:1|c' > /dev/tcp/localhost/9125",
+          "curl http://localhost:9102/metrics | grep 'test_tcp 1'",
+        )
+      '';
+    };
+
     surfboard = {
       exporterConfig = {
         enable = true;