Skip to content

Commit 897e1fb

Browse files
committed
conf: parsers: add k8s-nginx-ingress-error parser
1 parent 73d20d0 commit 897e1fb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

conf/parsers.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@
3232
Time_Key time
3333
Time_Format %d/%b/%Y:%H:%M:%S %z
3434

35+
[PARSER]
36+
# https://rubular.com/r/2JylvlQcEw6lQa
37+
Name k8s-nginx-ingress-error
38+
Format regex
39+
Regex ^(?<time_local>\d{4}/\d{2}/\d{2}\ \d{2}:\d{2}:\d{2})\ \[(?<level>emerg|alert|crit|error|warn|notice|info)\]\ (?<process_id>\d+)\#(?<thread_id>\d+):\ \*(?<connection_id>\d+)\ (?<error>.+?)(?:\ while\ (?<context>.+?))?,\ client:\ (?<client_ip>(?:(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])|(?:(?:[0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,7}:|(?:[0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,5}(?::[0-9a-fA-F]{1,4}){1,2}|(?:[0-9a-fA-F]{1,4}:){1,4}(?::[0-9a-fA-F]{1,4}){1,3}|(?:[0-9a-fA-F]{1,4}:){1,3}(?::[0-9a-fA-F]{1,4}){1,4}|(?:[0-9a-fA-F]{1,4}:){1,2}(?::[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:(?:(?::[0-9a-fA-F]{1,4}){1,6})|:(?:(?::[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(?::[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(?:ffff(?::0{1,4}){0,1}:){0,1}(?:(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])|(?:[0-9a-fA-F]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9]))),\ server:\ (?<server>[^\s,]+)(?:,\ request:\ \"(?<method>[A-Z]+?)\ (?<path>[\/\S]+?)\ (?<protocol>.+?)\")?(?:,\ upstream:\ \"(?<upstream>.+?)\")?(?:,\ host:\ \"(?<host>.+?)\")?(?:\s*,\ referrer:\ \"(?<referrer>.+?)\")?$
40+
Time_Key time_local
41+
Time_Format %Y/%m/%d %H:%M:%S
42+
3543
[PARSER]
3644
Name json
3745
Format json

0 commit comments

Comments
 (0)