Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: DNS probes should return enough metrics to tell servers that don't answer from servers that refuse our query #474

Closed
siebenmann opened this issue May 7, 2019 · 4 comments · Fixed by #990

Comments

@siebenmann
Copy link
Contributor

Right now, DNS probes do not return enough information to tell the difference between a DNS server not responding at all and a DNS server that responds with query refusals (eg status REFUSED). These are potentially fairly different failures, especially if you're querying an external DNS server to verify that it can resolve your domains, and it would be nice if you could tell the difference through the blackbox exporter.

Perhaps the easiest feature addition would be to expose a probe_dns_rcode metric and give it a value of -1 if the probe received no response.

@brian-brazil
Copy link
Contributor

Wouldn't probe_dns_answer_rrs and whether the probe succeeded cover this?

@siebenmann
Copy link
Contributor Author

Unfortunately they don't, at least currently. If the probe fails because of either a REFUSED return code from the server or because the server does not respond, probe success is 0 and probe_dns_answer_rrs and the other _rrs metrics are 0, so you can't tell the two cases apart. Perhaps the probe_dns rrs metrics should have some other value if there's no reply at all, but 0 still feels natural in that case and I think it would be better to have a different metric to be explicit.

(If the server is down, you can try to look at the probe duration to guess if there was a timeout. But if the server is up but rejecting UDP DNS packets, for example because it's not currently running a DNS server, the probe duration is still short.)

@candlerb
Copy link
Contributor

Being able to set or clear RD in requests would be useful too (for correctly testing recursive and authoritative servers)

@akshatgit
Copy link

If nobody is working on this, I'd like to contribute to this issue.

danteu added a commit to danteu/blackbox_exporter that referenced this issue Nov 25, 2022
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_target_reachable gauge which is 1 if and
only if the DNS query was executed correctly, i.e., that the target
host is reachable and has sent a response, and 0 otherwise.

Resolves prometheus#474

Signed-off-by: Daniel Teunis <[email protected]>
danteu added a commit to danteu/blackbox_exporter that referenced this issue Nov 26, 2022
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 prometheus#474

Signed-off-by: Daniel Teunis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants