Skip to content

Add probe_dns_reply_truncated metric to the DNS prober - #1606

Open
emmayusufu wants to merge 1 commit into
prometheus:masterfrom
emmayusufu:dns-reply-truncated-metric
Open

Add probe_dns_reply_truncated metric to the DNS prober#1606
emmayusufu wants to merge 1 commit into
prometheus:masterfrom
emmayusufu:dns-reply-truncated-metric

Conversation

@emmayusufu

Copy link
Copy Markdown

The DNS prober exposes counts of answer/authority/additional records but no response-header flags. A truncated reply (response larger than the UDP buffer, TC bit set) currently looks like a generic failure with no diagnostic signal.

The *dns.Msg from client.Exchange already carries the Truncated flag, so this adds a probe_dns_reply_truncated gauge: 0 normally, 1 when the reply has the TC bit set. That lets you tell a truncated reply apart from a real failure.

Added TestTruncatedDNSResponse (asserts 1 when the server sets TC), added the not-truncated case to the existing recursive test (asserts 0), and a CHANGELOG entry.

Closes #1258

The DNS prober exposed no response-header flags, so a truncated reply (response larger than the UDP buffer, TC bit set) looked like a generic failure. The *dns.Msg from client.Exchange already carries Truncated, so expose it as a gauge: 0 normally, 1 when the reply has the TC bit set.

Signed-off-by: Emmanuel Yusufu Kimaswa <kimaswaemma36@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant