Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add grok pattern to support different timestamp fmt in redis log #10033

Merged
merged 29 commits into from
Jan 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
aed6cc6
Never default to a qualifier when none of them are set. (#9148)
ph Nov 19, 2018
07c4fa5
Merge branch 'master' of github.com:kaiyan-sheng/beats
kaiyan-sheng Nov 27, 2018
ff52365
Merge branch 'master' of github.com:kaiyan-sheng/beats
kaiyan-sheng Dec 10, 2018
5f9f575
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 10, 2018
09d8b97
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 10, 2018
141277e
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 13, 2018
276a1de
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 14, 2018
19a705a
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 17, 2018
e54a566
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 18, 2018
edd4488
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 26, 2018
b0d2e22
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 27, 2018
378b4f9
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 28, 2018
1996739
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Dec 28, 2018
1e05766
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 2, 2019
33c130c
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 2, 2019
513bbd0
Merge branch 'master' of github.com:elastic/beats
kaiyan-sheng Jan 3, 2019
c618fd0
Merge branch 'master' of github.com:elastic/beats
kaiyan-sheng Jan 3, 2019
40c8368
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 3, 2019
042c89b
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 3, 2019
97393f4
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 4, 2019
5b300c8
Merge branch 'master' of github.com:elastic/beats
kaiyan-sheng Jan 4, 2019
be995ca
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 7, 2019
b9461c2
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 9, 2019
89f5158
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 10, 2019
2db435e
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 11, 2019
1f3911b
Merge remote-tracking branch 'upstream/master'
kaiyan-sheng Jan 14, 2019
83f2977
Add grok pattern to support different timestamp fmt in redis log
kaiyan-sheng Jan 12, 2019
f037ec2
Add changelog
kaiyan-sheng Jan 12, 2019
bfb8d2c
Fix rebase issue
kaiyan-sheng Jan 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Rename a few `mysql.*` fields to map to ECS. {pull}10008[10008]
- Rename a few `nginx.error.*` fields to map to ECS. {pull}10007[10007]
- Filesets with multiple ingest pipelines added in {pull}8914[8914] only work with Elasticsearch >= 6.5.0 {pull}10001[10001]
- Add grok pattern to support redis 5.0.3 log timestamp. {issue}9819[9819] {pull}10033[10033]

*Heartbeat*

Expand Down
7 changes: 5 additions & 2 deletions filebeat/module/redis/log/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
"grok": {
"field": "message",
"patterns": [
"(%{POSINT:process.pid:long}:%{CHAR:redis.log.role} )?%{REDISTIMESTAMP:redis.log.timestamp} %{REDISLEVEL:log.level} %{GREEDYDATA:message}",
"(%{POSINT:process.pid:long}:%{CHAR:redis.log.role} )?(%{REDISTIMESTAMP1:redis.log.timestamp}||%{REDISTIMESTAMP2:redis.log.timestamp}) %{REDISLEVEL:log.level} %{GREEDYDATA:message}",
"%{POSINT:process.pid:long}:signal-handler \\(%{POSINT:redis.log.timestamp}\\) %{GREEDYDATA:message}"
],
"pattern_definitions": {
"CHAR": "[a-zA-Z]",
"REDISLEVEL": "[.\\-*#]"
"REDISLEVEL": "[.\\-*#]",
"REDISTIMESTAMP1": "%{MONTHDAY} %{MONTH} %{TIME}",
"REDISTIMESTAMP2": "%{MONTHDAY} %{MONTH} %{YEAR} %{TIME}"
}
}
},
Expand Down Expand Up @@ -57,6 +59,7 @@
"field": "redis.log.timestamp",
"target_field": "@timestamp",
"formats": [
"dd MMM YYYY H:m:s.SSS",
"dd MMM H:m:s.SSS",
"dd MMM H:m:s",
"UNIX"
Expand Down
1 change: 1 addition & 0 deletions filebeat/module/redis/log/test/redis-5.0.3.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26571:M 27 Dec 2018 11:19:18.874 * Synchronization with replica 10.114.208.18:6023 succeeded
14 changes: 14 additions & 0 deletions filebeat/module/redis/log/test/redis-5.0.3.log-expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"ecs.version": "1.0.0-beta2",
"event.dataset": "redis.log",
"event.module": "redis",
"fileset.name": "log",
"input.type": "log",
"log.level": "notice",
"log.offset": 0,
"message": "Synchronization with replica 10.114.208.18:6023 succeeded",
"process.pid": 26571,
"redis.log.role": "master"
}
]