blackbox_exporter icon indicating copy to clipboard operation
blackbox_exporter copied to clipboard

Add probe_dns_rcode metric

Open dgl opened this issue 3 years ago • 5 comments

This metric has the value of the response code from the DNS server; 0 is NOERROR, per https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6

It can be used along with probe_success in order to diagnose why failures occurred.

For #474.

Signed-off-by: David Leadbeater [email protected]

dgl avatar Jan 02 '22 05:01 dgl

It was mentioned in #799 -- it would be nice, but per https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6 there's quite a few possibilities, maybe we could pick the ones we think are likely...

Say NOERROR, SERVFAIL, NXDOMAIN, REFUSED and then have an OTHER for the rest would cover it, but we do then lose what the actual rcode is (unless we use the value of OTHER to be the rcode, but that is wrong for an ENUM style metric...)

dgl avatar Jan 02 '22 08:01 dgl

Adding some reviewers to get any thoughts on labels vs numbers...

dgl avatar Jan 25 '22 04:01 dgl

Adding some reviewers to get any thoughts on labels vs numbers...

Sorry, I was sure I had replied to this...

I would prefer @SuperQ's proposal. That makes it easier to build a counter out of this if desired (e.g. using a recording rule).

IIRC there are ~ 40 possible response codes. As long as the returned one is always captured, I don't have a strong preference for including a few select ones all the time.

mem avatar May 09 '22 22:05 mem

We could provide a list of default "always expodsed" rcodes as a command line flag. Something like --probe.dns.rcodes=NOERROR,SRVFAIL,NXDOMAIN". If the rcode is some other code, we could either assign it to an OTHER bucket, or since it's reasonably limited, we could directly expose the "other" code.

Opinions?

SuperQ avatar Dec 30 '22 16:12 SuperQ

We could provide a list of default "always expodsed" rcodes as a command line flag. Something like --probe.dns.rcodes=NOERROR,SRVFAIL,NXDOMAIN". If the rcode is some other code, we could either assign it to an OTHER bucket, or since it's reasonably limited, we could directly expose the "other" code.

Opinions?

I would be OK with that (either option: exposing the "new" code, or using an "OTHER" bucket, maybe leaning slightly towards the latter).

mem avatar Jan 04 '23 20:01 mem