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:
@@ -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'"
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user