prometheus / blackbox_exporter

Blackbox prober exporter
https://prometheus.io
Apache License 2.0
4.44k stars 1.03k forks source link

RFE: in the DNS prober, expose the state of the 'tc' response flag (and possibly others) #1258

Open siebenmann opened 2 weeks ago

siebenmann commented 2 weeks ago

Currently, Blackbox does not expose the state of any response flags in metrics. This is especially important for the case of the 'tc' flag, which indicates that the reply was truncated. This makes it impossible to tell the difference between a failing query where your DNS server is unable to fully resolve something to (for example) the terminal A records that your module is looking for, and a situation where the full reply is too large and has been truncated by the DNS server. A plausible metric name for just the 'tc' flag might be probe_dns_reply_truncated.

The possibility of this happening is more than one might think, since today the Blackbox DNS prober doesn't have any option for setting EDNS extended size, which leaves it with the default 512-byte DNS reply size limit per the documentation for github.com/miekg/dns.