From 3624f0bbf016e948f8f88d7e93f4a7d441979f13 Mon Sep 17 00:00:00 2001 From: Philipp Riegger Date: Sun, 8 May 2022 21:59:27 +0200 Subject: services.prometheus.exporters.statsd: init service --- nixos/tests/prometheus-exporters.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'nixos/tests/prometheus-exporters.nix') diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 849f5ee159f..04a532f7c2e 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -1151,6 +1151,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; -- cgit 1.4.1