-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(inputs.dns_query): Allow ignoring errors of specific types #14992
Conversation
@srebhan thoughts on this method of letting the user ignore errors in the logs? The user would still get a metric as expected indicating the error, but would hide it from the logs? |
I agree and we currently return the following metric with an error result and the return code of NXDOMAIN:
See above, as we already do return a metric with the error message. The reporter's request was to hide error messages in logs, not modify or change any metric. |
@powersj sorry to be so ambiguous! What I want to say is that a NXDOMAIN answer is valid for an A request (and probably others) and should not cause an error at all! The check and error is there to handle cases where we get some completely unexpected, unrelated and thus invalid answer to the query... |
Ahh thanks for the clarification. So how would we determine "completely unexpected"? Would we ignore NXDOMAIN status and log an error for other issues like "SERVFAIL", "BADCOOKIE", "BADALG"? |
@srebhan updated PR to omit nxdomain, I'm not sure about the others (maybe YXDOMAIN?) as they do seem to be server or request related:
|
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I think it's now pretty easy to add more errors to ignore if necessary...
Summary
Allows the user to specify ignoring certain error types from printing in the logs.
Checklist
Related issues
fixes: #14941