- Notifications
You must be signed in to change notification settings - Fork 129
Add option to exclude lines from sample log files in pipeline tests #380
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -85,6 +85,8 @@ Before sending log events to the ingest pipeline, a data transformation process | |
| ```yml | ||
| multiline: | ||
| first_line_pattern: "^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}" | ||
| exclude_lines: | ||
| - "^#.*" | ||
| fields: | ||
| "@timestamp": "2020-04-28T11:07:58.223Z" | ||
| ecs: | ||
| | @@ -99,6 +101,8 @@ numeric_keyword_fields: | |
| | ||
| The `multiline` section ([raw files](#raw-files) only) configures the log file reader to correctly detect multiline log entries using the `first_line_pattern`. Use this property if your logs may be split into multiple lines, e.g. Java stack traces. | ||
| | ||
| The `exclude_lines` sections allows to filter out lines from the sample log files. If `multiline` is used, pattern is checked after merging lines. | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding the elastic/integrations#1145: I'm wondering if it's possible to remove lines starting with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea, I will try that! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems that something like #384 will be needed, otherwise errors like this happen: | ||
| | ||
| The `fields` section allows for customizing extra fields to be added to every read log entry (e.g. `@timestamp`, `ecs`). Use this property to extend your logs with data that can't be extracted from log content, but it's fine to have same field values for every record (e.g. timezone, hostname). | ||
| | ||
| The `dynamic_fields` section allows for marking fields as dynamic (every time they have different non-static values), so that pattern matching instead of strict value check is applied. | ||
| | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -2,4 +2,4 @@ | |
| "expected": [ | ||
| null | ||
| ] | ||
| } | ||
| } | ||
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.
I think you should prepare a PR for the package-spec first.