-
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.
[Filebeat] Fix RFC5424 date parsing in system/syslog in pipeline (#12529
) The date format used by the system/syslog pipeline has a couple of issues: - Since Elasticsearch switched to Java time from Joda time, it won't correctly parse timezone offsets that use a colon to separate hours and minutes. - RFC5424 allows for 1 to 6 digits for the fractional second. This updates the pipeline to also accept 3 decimals (milliseconds).
- Loading branch information
Showing
5 changed files
with
58 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1986-04-26T01:23:45.101+0400 rmbkmonitor04 shutdown[2649]: shutting down for system halt | ||
1986-04-26T01:23:45.388424+04:00 rmbkmonitor04 thermald: constraint_0_power_limit_uw exceeded. |
31 changes: 31 additions & 0 deletions
31
filebeat/module/system/syslog/test/tz-offset.log-expected.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,31 @@ | ||
[ | ||
{ | ||
"@timestamp": "1986-04-25T21:23:45.101Z", | ||
"event.dataset": "system.syslog", | ||
"event.module": "system", | ||
"event.timezone": "+00:00", | ||
"fileset.name": "syslog", | ||
"host.hostname": "rmbkmonitor04", | ||
"input.type": "log", | ||
"log.file.path": "tz-offset.log", | ||
"log.offset": 0, | ||
"message": "shutting down for system halt", | ||
"process.name": "shutdown", | ||
"process.pid": 2649, | ||
"service.type": "system" | ||
}, | ||
{ | ||
"@timestamp": "1986-04-25T21:23:45.388Z", | ||
"event.dataset": "system.syslog", | ||
"event.module": "system", | ||
"event.timezone": "+00:00", | ||
"fileset.name": "syslog", | ||
"host.hostname": "rmbkmonitor04", | ||
"input.type": "log", | ||
"log.file.path": "tz-offset.log", | ||
"log.offset": 89, | ||
"message": "constraint_0_power_limit_uw exceeded.", | ||
"process.name": "thermald", | ||
"service.type": "system" | ||
} | ||
] |
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