[Infoblox_nios]: missing dns.query.name for message containing ECS option suffix#19222
Draft
vinit-chauhan wants to merge 1 commit into
Draft
Conversation
…age containing -E(0)D
Contributor
✅ Vale Linting ResultsNo issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
|
|
Pinging @elastic/integration-experience (Team:Integration-Experience) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
The Infoblox NIOS DNS pipeline was silently dropping all parsed DNS question fields (
dns.question.name,dns.question.class,dns.question.type, and related ECS fields) for any query log line that included an EDNS Client Subnet (ECS) option suffix such as[ECS 89.160.20.112/24/0]. The root cause was a Grok pattern inpipeline_dns.ymlthat anchored with$immediately after the server IP address in parentheses, so any line with the trailing[ECS ...]bracket failed to match that pattern entirely and fell through to a catch-all, losing all structured DNS fields.The fix makes the ECS suffix optional in the Grok pattern by appending
(?:\s*%{ECS_CLIENT_SUBNET})?$to the query line pattern. A new named pattern definition,ECS_CLIENT_SUBNET, matches the full[ECS <ip>[/<prefix_len>[/<scope_prefix_len>]]]structure, capturing the subnet IP, prefix length, and scope prefix length into new fields underinfoblox_nios.log.dns.ecs_client_subnet. Aconvertprocessor coerces the captured IP string to theiptype (with anon_failureguard that removes the field and appends toerror.message), and anappendprocessor adds the ECS client subnet IP torelated.ip.Three new structured fields are declared in
fields.ymlunderinfoblox_nios.log.dns.ecs_client_subnet(ip,prefix_length,scope_prefix_length) and documented inREADME.md. Three new pipeline test cases cover the fixed behaviour: an IPv6 client with a fullip/prefix/scopeECS tuple, an IPv4 client with a full ECS tuple, and an IPv4 client with an IP-only ECS suffix (no prefix lengths). The package is bumped from2.1.1to2.1.2with a correspondingchangelog.ymlentry.Checklist
changelog.ymlfile.Author's Checklist
pipeline_dns.ymlcorrectly parses both plain query lines (no ECS suffix) and lines with[ECS ip/prefix/scope]or[ECS ip]suffixes, and thatdns.question.nameis populated in all three cases.ECS_CLIENT_SUBNETpattern definition handles the optional prefix-length and scope-prefix-length segments without over-matching or under-matching.infoblox_nios.log.dns.ecs_client_subnet.ipis appended torelated.ipand that theconvertprocessor'son_failurepath removes the field cleanly when the value is not a valid IP.changelog.ymlentry is present and themanifest.ymlversion is bumped to2.1.2.How to test this PR locally
Related issues
Screenshots