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.
This commit is contained in:
Aliaksandr
2026-04-24 19:34:42 +03:00
parent d9a2e3b3c0
commit f9e4559b77
+1 -1
View File
@@ -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'"
)
'';
};