forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Filebeat] Improve ECS categorization field mappings for mssql module (…
…elastic#17376) Improve ECS categorization field mappings for mssql module. - event.kind - event.category - event.type Closes elastic#16171 (cherry picked from commit e3c72b3)
- Loading branch information
Showing
5 changed files
with
157 additions
and
59 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 was deleted.
Oops, something went wrong.
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,50 @@ | ||
description: Pipeline to parse MSSQL logs | ||
processors: | ||
- grok: | ||
field: message | ||
patterns: | ||
- '%{MSSQL_DATE:date} %{DATA:mssql.log.origin} [ ]*%{GREEDYDATA:msg_temp}' | ||
pattern_definitions: | ||
MSSQL_DATE: '%{DATA} %{DATA}' | ||
- date: | ||
if: ctx.event.timezone == null | ||
field: date | ||
formats: | ||
- yyyy-MM-dd HH:mm:ss.SS | ||
on_failure: | ||
- append: | ||
field: error.message | ||
value: '{{ _ingest.on_failure_message }}' | ||
- date: | ||
if: ctx.event.timezone != null | ||
field: date | ||
formats: | ||
- yyyy-MM-dd HH:mm:ss.SS | ||
timezone: '{{ event.timezone }}' | ||
on_failure: | ||
- append: | ||
field: error.message | ||
value: '{{ _ingest.on_failure_message }}' | ||
- remove: | ||
field: date | ||
ignore_missing: true | ||
- rename: | ||
field: message | ||
target_field: log.original | ||
- rename: | ||
field: msg_temp | ||
target_field: message | ||
ignore_missing: true | ||
- set: | ||
field: event.kind | ||
value: event | ||
- append: | ||
field: event.category | ||
value: database | ||
- append: | ||
field: event.type | ||
value: info | ||
on_failure: | ||
- set: | ||
field: error.message | ||
value: '{{ _ingest.on_failure_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