-
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.
Convert Filebeat system.syslog to ECS (#9135)
- Move all fields of `system.syslog.*` to ECS. Previous field names are field aliases towards the new corresponding ECS field: - system.syslog.timestamp: field with original formatting of syslog timestamp is removed. This field name still aliases to `@timestamp` - system.syslog.hostname => host.hostname - system.syslog.program => process.name - system.syslog.pid => process.pid - system.syslog.message => message - Convert PID to an int
- Loading branch information
Showing
8 changed files
with
117 additions
and
79 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
Large diffs are not rendered by default.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,53 @@ | ||
{ | ||
"description": "Pipeline for parsing Syslog messages.", | ||
"processors": [ | ||
{ | ||
"grok": { | ||
"field": "message", | ||
"patterns": [ | ||
"%{SYSLOGTIMESTAMP:system.syslog.timestamp} %{SYSLOGHOST:system.syslog.hostname} %{DATA:system.syslog.program}(?:\\[%{POSINT:system.syslog.pid}\\])?: %{GREEDYMULTILINE:system.syslog.message}", | ||
"%{SYSLOGTIMESTAMP:system.syslog.timestamp} %{GREEDYMULTILINE:system.syslog.message}" | ||
], | ||
"pattern_definitions" : { | ||
"GREEDYMULTILINE" : "(.|\n)*" | ||
"description": "Pipeline for parsing Syslog messages.", | ||
"processors": [ | ||
{ | ||
"grok": { | ||
"field": "message", | ||
"patterns": [ | ||
"%{SYSLOGTIMESTAMP:system.syslog.timestamp} %{SYSLOGHOST:host.hostname} %{DATA:process.name}(?:\\[%{POSINT:process.pid:int}\\])?: %{GREEDYMULTILINE:system.syslog.message}", | ||
"%{SYSLOGTIMESTAMP:system.syslog.timestamp} %{GREEDYMULTILINE:system.syslog.message}" | ||
], | ||
"pattern_definitions" : { | ||
"GREEDYMULTILINE" : "(.|\n)*" | ||
}, | ||
"ignore_missing": true | ||
} | ||
}, | ||
"ignore_missing": true | ||
} | ||
}, | ||
{ | ||
"remove": { | ||
"field": "message" | ||
} | ||
}, | ||
{ | ||
"date": { | ||
"field": "system.syslog.timestamp", | ||
"target_field": "@timestamp", | ||
"formats": [ | ||
"MMM d HH:mm:ss", | ||
"MMM dd HH:mm:ss" | ||
], | ||
{< if .convert_timezone >}"timezone": "{{ beat.timezone }}",{< end >} | ||
"ignore_failure": true | ||
} | ||
} | ||
], | ||
"on_failure" : [{ | ||
"set" : { | ||
"field" : "error.message", | ||
"value" : "{{ _ingest.on_failure_message }}" | ||
} | ||
}] | ||
{ | ||
"remove": { | ||
"field": "message" | ||
} | ||
}, | ||
{ | ||
"rename": { | ||
"field": "system.syslog.message", | ||
"target_field": "message", | ||
"ignore_missing": true | ||
} | ||
}, | ||
{ | ||
"date": { | ||
"field": "system.syslog.timestamp", | ||
"target_field": "@timestamp", | ||
"formats": [ | ||
"MMM d HH:mm:ss", | ||
"MMM dd HH:mm:ss" | ||
], | ||
{< if .convert_timezone >}"timezone": "{{ beat.timezone }}",{< end >} | ||
"ignore_failure": true | ||
} | ||
}, | ||
{ | ||
"remove": { | ||
"field": "system.syslog.timestamp" | ||
} | ||
} | ||
], | ||
"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