Skip to content

Commit 09e786f

Browse files
[system][syslog] add a pattern in filebeat.system module to capture greedy multiline logs with ISO timestamps
1 parent 5c2d245 commit 09e786f

File tree

5 files changed

+45
-0
lines changed

5 files changed

+45
-0
lines changed

packages/system/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "1.67.4"
3+
changes:
4+
- description: Add new grok pattern to system (syslog) module to capture multiline logs with ISO 8601 timestamps.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/1
27
- version: "1.67.3"
38
changes:
49
- description: Remove dynamic template to avoid ECS overrides.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2020-12-25T23:59:59+02:00 a-mac-with-esc-key GoogleSoftwareUpdateAgent[21412]: 2016-12-13 11:35:28.421
2+
GoogleSoftwareUpdateAgent[21412/0x700007399000] [lvl=2] -[KSUpdateEngine updateAllExceptProduct:] KSUpdateEngine updating all
3+
installed products, except:'com.google.Keystone'.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dynamic_fields:
2+
"@timestamp": "^[0-9]{4}(-[0-9]{2}){2}T[0-9]{2}(:[0-9]{2}){2}\\.[0-9]{3}-[0-9]{2}:[0-9]{2}$"
3+
multiline:
4+
first_line_pattern: "^\\w+ \\d+ "
5+
fields:
6+
event:
7+
kind: "event"
8+
timezone: "GMT-0200"
9+
input.type: log
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"expected": [
3+
{
4+
"ecs": {
5+
"version": "8.11.0"
6+
},
7+
"event": {
8+
"kind": "event",
9+
"timezone": "GMT-0200"
10+
},
11+
"host": {
12+
"hostname": "a-mac-with-esc-key"
13+
},
14+
"input": {
15+
"type": "log"
16+
},
17+
"message": "2016-12-13 11:35:28.421\n\t\tGoogleSoftwareUpdateAgent[21412/0x700007399000] [lvl=2] -[KSUpdateEngine updateAllExceptProduct:] KSUpdateEngine updating all\n\t\tinstalled products, except:'com.google.Keystone'.",
18+
"process": {
19+
"name": "GoogleSoftwareUpdateAgent",
20+
"pid": 21412
21+
},
22+
"system": {
23+
"syslog": {}
24+
}
25+
}
26+
]
27+
}

packages/system/data_stream/syslog/elasticsearch/ingest_pipeline/default.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ processors:
88
- '%{SYSLOGTIMESTAMP:system.syslog.timestamp} %{SYSLOGHOST:host.hostname} %{DATA:process.name}(?:\[%{POSINT:process.pid:long}\])?: %{GREEDYMULTILINE:system.syslog.message}'
99
- '%{SYSLOGTIMESTAMP:system.syslog.timestamp} %{GREEDYMULTILINE:system.syslog.message}'
1010
- '%{TIMESTAMP_ISO8601:system.syslog.timestamp} %{SYSLOGHOST:host.hostname} %{DATA:process.name}(?:\[%{POSINT:process.pid:long}\])?: %{GREEDYMULTILINE:system.syslog.message}'
11+
- '%{TIMESTAMP_ISO8601:system.syslog.timestamp} %{GREEDYMULTILINE:system.syslog.message}'
1112
pattern_definitions:
1213
GREEDYMULTILINE: |-
1314
(.|

0 commit comments

Comments
 (0)