From f9e4559b773822abfa1c3a8decc9377144aa3bb2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Thu, 12 Feb 2026 02:14:58 +0200 Subject: [PATCH] nixosTests.prometheus-exporters.bind: check bind_up metric Check for 'bind_up 1' instead of 'bind_query_recursions_total 0'. The bind_query_recursions_total metric is only emitted when there have been recursive queries. In a fresh BIND instance with no traffic, this counter doesn't exist. The bind_up metric reliably indicates that the exporter successfully connected to BIND's statistics channel. --- nixos/tests/prometheus-exporters.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 6383f1b54cfd..3f8d5fa61110 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -108,7 +108,7 @@ let wait_for_unit("prometheus-bind-exporter.service") wait_for_open_port(9119) succeed( - "curl -sSf http://localhost:9119/metrics | grep 'bind_query_recursions_total 0'" + "curl -sSf http://localhost:9119/metrics | grep 'bind_up 1'" ) ''; };