iis: fix error pipeline failing to parse HTTPERR lines with hyphenated methods#20273
Open
stefans-elastic wants to merge 2 commits into
Open
iis: fix error pipeline failing to parse HTTPERR lines with hyphenated methods#20273stefans-elastic wants to merge 2 commits into
stefans-elastic wants to merge 2 commits into
Conversation
|
💚 CLA has been signed |
Contributor
Contributor
✅ Elastic Docs Style Checker (Vale)No 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. |
…ed HTTP methods The iis.error grok pattern used WORD for the HTTP method, which could not match hyphenated methods such as M-POST, causing ingestion failures. Widen the pattern to accept hyphenated methods and add a pipeline test fixture covering an M-POST HTTPERR line.
stefans-elastic
force-pushed
the
fix/iis-error-mpost-grok
branch
from
July 22, 2026 07:51
35c2e99 to
2bb895e
Compare
Contributor
🚀 Benchmarks reportTo see the full report comment with |
Contributor
|
✅ All changelog entries have the correct PR link. |
💚 Build Succeeded
History
|
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
iis.erroringest pipeline's grok processor matched the HTTP request method with%{WORD:http.request.method}.WORDonly matches\w+, so it cannot match a hyphen. HTTP Extension Framework verbs such asM-POSTtherefore caused the whole grok processor to fail to match, and the event was routed toon_failureinstead of being parsed.Before: an HTTPERR line such as
fails to match either grok alternative in the pipeline (both require
%{WORD:http.request.method}), so the document ends up inon_failurewith anerror.messageinstead of being parsed.After: both grok alternatives now use
(?:-|%{NOTSPACE:http.request.method})for the method field (mirroring the dash-first alternation already used elsewhere in this same pipeline for the URI, reason and queue fields), so:M-POSTis captured correctly ashttp.request.method.-(no method logged) still leaveshttp.request.methodunset, exactly as before — this dash-first ordering was chosen over a plain%{WORD:...}→%{NOTSPACE:...}swap because a naive swap (keepingNOTSPACEfirst in the alternation) would instead capture the literal-as the string-, which is a regression against the existing pipeline tests (e.g. the "reason-only" HTTPERR lines that have no method/URI/status at all).Added a new pipeline test case (
M-POSTrequest against a backslash path-traversal URI) topackages/iis/data_stream/error/_dev/test/pipeline/test-iis-error.log/test-iis-error.log-expected.json, and bumped the package version with a changelog entry.Checklist
changelog.ymlfile.Author's Checklist
errorpipeline test fixtures (no regressions)M-POSTtest case parses with the expected fieldsWORD-safe, now matches the grok pattern (previously it matched nothing and went toon_failure)How to test this PR locally
This runs the pipeline tests in
packages/iis/data_stream/error/_dev/test/pipeline/against a real Elasticsearch ingest simulate, including the newM-POSTcase.Generated by Claude Code