Add probe_dns_query_succeeded metric
authorDaniel Teunis <daniel@teunis.cc>
Fri, 25 Nov 2022 23:05:59 +0000 (00:05 +0100)
committerDaniel Teunis <daniel@teunis.cc>
Sat, 26 Nov 2022 18:53:22 +0000 (19:53 +0100)
commit449e0d7f213564c5d2e5c3c2c4a9e30e998c50cd
tree7c13df2722e2b9c4944159e45e2a692b6d240e15
parent7554eefbb510c7c8dd62e455e9a128045b4d0b9d
Add probe_dns_query_succeeded metric

Currently, one may not be able to differentiate between a query refusal
by the target and the target not responding to a query. These two cases
can have very different ramifications.

This patch adds the probe_dns_query_succeeded gauge which is 1 if and
only if the DNS query was executed correctly, i.e., that the target
host has sent a response, and 0 otherwise.

Resolves #474

Signed-off-by: Daniel Teunis <daniel@teunis.cc>
prober/dns.go
prober/dns_test.go