-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ingest structured ES deprecation logs (#10445)
* parse structed ES deprecation logs * Adding CHANGELOG entry * Add breaking change CHANGELOG entry * Regenerating generated files
- Loading branch information
1 parent
11d8ba4
commit b70fdcd
Showing
13 changed files
with
431 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
102 changes: 102 additions & 0 deletions
102
filebeat/module/elasticsearch/deprecation/ingest/pipeline-json.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
"description": "Pipeline for parsing the Elasticsearch deprecation log file in JSON format.", | ||
"on_failure": [ | ||
{ | ||
"set": { | ||
"field": "error.message", | ||
"value": "{{ _ingest.on_failure_message }}" | ||
} | ||
} | ||
], | ||
"processors": [ | ||
{ | ||
"json": { | ||
"field": "message", | ||
"target_field": "elasticsearch.deprecation" | ||
} | ||
}, | ||
{ | ||
"drop": { | ||
"if": "ctx.elasticsearch.deprecation.type != 'deprecation'" | ||
} | ||
}, | ||
{ | ||
"remove": { | ||
"field": "elasticsearch.deprecation.type" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "elasticsearch.deprecation.level", | ||
"target_field": "log.level" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "elasticsearch.deprecation.component", | ||
"target_field": "elasticsearch.component" | ||
} | ||
}, | ||
{ | ||
"dot_expander": { | ||
"field": "cluster.name", | ||
"path": "elasticsearch.deprecation" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "elasticsearch.deprecation.cluster.name", | ||
"target_field": "elasticsearch.cluster.name" | ||
} | ||
}, | ||
{ | ||
"dot_expander": { | ||
"field": "node.name", | ||
"path": "elasticsearch.deprecation" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "elasticsearch.deprecation.node.name", | ||
"target_field": "elasticsearch.node.name" | ||
} | ||
}, | ||
{ | ||
"dot_expander": { | ||
"field": "cluster.uuid", | ||
"path": "elasticsearch.deprecation" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "elasticsearch.deprecation.cluster.uuid", | ||
"target_field": "elasticsearch.cluster.uuid", | ||
"ignore_missing": true | ||
} | ||
}, | ||
{ | ||
"dot_expander": { | ||
"field": "node.id", | ||
"path": "elasticsearch.deprecation" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "elasticsearch.deprecation.node.id", | ||
"target_field": "elasticsearch.node.id", | ||
"ignore_missing": true | ||
} | ||
}, | ||
{ | ||
"remove": { | ||
"field": "message" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "elasticsearch.deprecation.message", | ||
"target_field": "message" | ||
} | ||
} | ||
] | ||
} |
24 changes: 24 additions & 0 deletions
24
filebeat/module/elasticsearch/deprecation/ingest/pipeline-plaintext.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"description": "Pipeline for parsing the Elasticsearch deprecation log file in plaintext format.", | ||
"on_failure": [ | ||
{ | ||
"set": { | ||
"field": "error.message", | ||
"value": "{{ _ingest.on_failure_message }}" | ||
} | ||
} | ||
], | ||
"processors": [ | ||
{ | ||
"grok": { | ||
"field": "message", | ||
"pattern_definitions": { | ||
"GREEDYMULTILINE": "(.|\n)*" | ||
}, | ||
"patterns": [ | ||
"\\[%{TIMESTAMP_ISO8601:elasticsearch.deprecation.timestamp}\\]\\[%{LOGLEVEL:log.level}%{SPACE}*\\]\\[%{DATA:elasticsearch.component}%{SPACE}*\\] %{GREEDYMULTILINE:message}" | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.