Skip to content

Commit dca9a5a

Browse files
committed
Support parse Redis 5 logs
Signed-off-by: v0112358 <[email protected]>
1 parent a00d8ff commit dca9a5a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

patterns/grok-patterns

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ BASE10NUM (?<![0-9.+-])(?>[+-]?(?:(?:[0-9]+(?:\.[0-9]+)?)|(?:\.[0-9]+)))
77
NUMBER (?:%{BASE10NUM})
88
BASE16NUM (?<![0-9A-Fa-f])(?:[+-]?(?:0x)?(?:[0-9A-Fa-f]+))
99
BASE16FLOAT \b(?<![0-9A-Fa-f.])(?:[+-]?(?:0x)?(?:(?:[0-9A-Fa-f]+(?:\.[0-9A-Fa-f]*)?)|(?:\.[0-9A-Fa-f]+)))\b
10+
CHAR [a-zA-Z]
1011

1112
POSINT \b(?:[1-9][0-9]*)\b
1213
NONNEGINT \b(?:[0-9]+)\b

patterns/redis

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
REDISTIMESTAMP %{MONTHDAY} %{MONTH} %{TIME}
2-
REDISLOG \[%{POSINT:pid}\] %{REDISTIMESTAMP:timestamp} \*
1+
REDISLEVEL [.\-*#]
2+
REDISTIMESTAMP1 %{MONTHDAY} %{MONTH} %{TIME}
3+
REDISTIMESTAMP2 %{MONTHDAY} %{MONTH} %{YEAR} %{TIME}
4+
REDISLOG \[%{POSINT:pid}\] %{REDISTIMESTAMP1:timestamp} \*
35
REDISMONLOG %{NUMBER:timestamp} \[%{INT:database} %{IP:client}:%{NUMBER:port}\] "%{WORD:command}"\s?%{GREEDYDATA:params}
6+
REDIS5LOG %{POSINT:pid}:%{CHAR:role} %{REDISTIMESTAMP2:timestamp} %{REDISLEVEL:log_level} %{GREEDYDATA:message}

0 commit comments

Comments
 (0)