Support additional parser configuration: ndjson and multiline in container logs data-stream - #2345
Support additional parser configuration: ndjson and multiline in container logs data-stream#2345tetianakravchenko merged 8 commits into
Conversation
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
…iguratios Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
…al parsers configuration instead of multilineParser ad jsonParser Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
|
@mukeshelastic @akshay-saraswat please have a look on the screenshots in the PR description, and let me know if you have any objections on the UI for this feature |
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
|
we also discussed with @mukeshelastic option to enable json parser by default, for now was decided to keep it as a advanced configuration, as this configuration applies to all cluster and there is no conditions available to limit it to specified image/namespace. It might be changed later |
|
/test |
ChrsMark
left a comment
There was a problem hiding this comment.
Looks good. I left a few comments.
| @@ -1,4 +1,9 @@ | |||
| # newer versions go on top | |||
| - version: "1.7.1" | |||
There was a problem hiding this comment.
This is an enhancement so I would go with 1.8.0
| default: | | ||
| # - ndjson: | ||
| # target: json | ||
| # - multiline: ~ |
There was a problem hiding this comment.
It this is the baseline config for multiline or just a placeholder? Maybe a more accurate default could be used here.
There was a problem hiding this comment.
I would consider it more as a placeholder, to be honest I am not sure what could be a reasonable default here, any ideas here?
There was a problem hiding this comment.
Maybe sth like
multiline.type: pattern
multiline.pattern: '^\['
multiline.negate: true
multiline.match: after
The very basic example from https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html#multiline. Of course this is not supposed to cover 100% the possible cases so it would be nice if we can refer to docs so as to be be more clear. The idea of having a more complete config here is to give a sense of how the config looks like and then users can dive more into the docs according their specific use cases.
There was a problem hiding this comment.
| description: > | ||
| Kubernetes hostname as reported by the node’s kernel | ||
|
|
||
| - name: node.labels.* |
There was a problem hiding this comment.
I think we will also need to document node.annotations.* even if they are not generated by default and hence the tests would never warn us about having them undocumented. Same for namespace_annotations.
…notations.* fields Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
|
Great job here @tetianakravchenko ! |
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
…ainer logs data-stream (elastic#2345) * add sample_event; support ndjson parser Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co> * add possibility to adjust container, ndjson and multiline parser configuratios Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co> * add pr link Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co> * remove test; add container parser configuration; use generic Additional parsers configuration instead of multilineParser ad jsonParser Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co> * add a link to parsers documentation Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co> * bump package version to 1.8.0; add node.annotations. and namespace_annotations.* fields Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co> * add container parser link to the documentation Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co> * add multiline configuration example Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

What does this PR do?
ndjsonandmultilinesample_eventand add missing fieldscontainerparser withformatandstreamconfiguration parametersChecklist
changelog.ymlfile.How to test this PR locally
Related issues
Screenshots
Example of plain txt log:
Example of nginx plain text log
Example of json logs
Example of elastic-agent json text log