Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f8bf4e1
config_format: Add parser*.yaml references alongside parser*.conf
hlein Nov 18, 2025
c293b6e
conf: prune old parser*.conf files that are no longer referenced
hlein Nov 18, 2025
2b82251
conf: parser: standardize regex quoting in yaml configs
hlein Nov 17, 2025
649c530
conf: parser: expand kmsg-netfilter-log to an extended-regex
hlein Nov 17, 2025
45448eb
conf: parser: kmsg-netfilter-log: fix kernel uptime matching
hlein Nov 17, 2025
6c90742
conf: parser: kmsg-netfilter-log: fix MAC= parsing
hlein Nov 17, 2025
05337ef
conf: parser: add test cases for rfc5424
hlein Nov 17, 2025
4e529cc
conf: parser: fix syslog-rfc5424 regex - msg is optional
hlein Nov 17, 2025
8bebc7d
conf: parser: parsers_extra.yaml: Associate comment with the correct …
hlein Nov 17, 2025
8fec818
conf: parser: iptables: link to the reference example logs + add test…
hlein Nov 18, 2025
68aedef
conf: parser: expand iptables to an extended-regex
hlein Nov 18, 2025
8ca027f
conf: parser: iptables: break out MAC= section, fix a typo
hlein Nov 18, 2025
0648bdb
conf: parser: iptables: add a test-case that is currently missed
hlein Nov 18, 2025
2ed5cb0
tests: config_format: more compare methods to test improvements
hlein Nov 18, 2025
d49e74f
conf: parser: iptables: fixes so more test cases match
hlein Nov 18, 2025
192a1e5
conf: parser: iptables: capture all TCP flags to pkt_flag
hlein Nov 18, 2025
0539569
tests: config_format: iptables: Add many examples not currently suppo…
hlein Nov 19, 2025
c922539
conf: parser: iptables: Handle many more message types, more fields
hlein Nov 20, 2025
1d9ddbf
conf: parser: iptables: minor cleanups
hlein Nov 20, 2025
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
15 changes: 0 additions & 15 deletions conf/parser_custom.conf

This file was deleted.

6 changes: 3 additions & 3 deletions conf/parser_custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ parsers:
- name: rabbitmq
# https://rubular.com/r/6ZCuwV4Xa7nfA3
format: regex
regex: (?<date>[^ ]+)\s(?<time>[^ ]+)\s\[(?<log_level>[^ \]]*)\]\s(?<PID>[^ ]*)\s(?<msg>((([a-zA-Z]*\s+)+[^ ]*)+)+)
regex: '(?<date>[^ ]+)\s(?<time>[^ ]+)\s\[(?<log_level>[^ \]]*)\]\s(?<PID>[^ ]*)\s(?<msg>((([a-zA-Z]*\s+)+[^ ]*)+)+)'

- name: neo4j
# https://rubular.com/r/jWfJIOMKr2LgcO
format: regex
regex: (?<date>[^ ]*) (?<time>[^ ]*) (?<log_level>[^ ]*)\s(?<msg>([^ ]*\s+[^ ]*)+)
regex: '(?<date>[^ ]*) (?<time>[^ ]*) (?<log_level>[^ ]*)\s(?<msg>([^ ]*\s+[^ ]*)+)'

- name: external-dns
# https://rubular.com/r/U8VbByp0oRPLU6
format: regex
regex: ([^ ])\"(?<time>[^ ]+)\"\s([^ ]+)\=(?<log_level>[.+a-zA-Z]+)\s([^ ]+)\"(?<msg>([^ ]*\s+[^ ]*\s[a-zA-Z0-9]*)+)
regex: '([^ ])\"(?<time>[^ ]+)\"\s([^ ]+)\=(?<log_level>[.+a-zA-Z]+)\s([^ ]+)\"(?<msg>([^ ]*\s+[^ ]*\s[a-zA-Z0-9]*)+)'
39 changes: 34 additions & 5 deletions conf/parsers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ parsers:

- name: docker-daemon
format: regex
regex: time="(?<time>[^ ]*)" level=(?<level>[^ ]*) msg="(?<msg>[^ ].*)"
regex: 'time="(?<time>[^ ]*)" level=(?<level>[^ ]*) msg="(?<msg>[^ ].*)"'
time_key: time
time_format: '%Y-%m-%dT%H:%M:%S.%L'
time_keep: On

- name: syslog-rfc5424
# https://rubular.com/r/PMypubVdqyOTT0
format: regex
regex: ^\<(?<pri>[0-9]{1,5})\>1 (?<time>[^ ]+) (?<host>[^ ]+) (?<ident>[^ ]+) (?<pid>[-0-9]+) (?<msgid>[^ ]+) (?<extradata>(\[(.*?)\]|-)) (?<message>.+)$
regex: '^\<(?<pri>[0-9]{1,5})\>1 (?<time>[^ ]+) (?<host>[^ ]+) (?<ident>[^ ]+) (?<pid>[-0-9]+) (?<msgid>[^ ]+) (?<extradata>(\[(.*?)\]|-))(?: (?<message>.+))?$'
time_key: time
time_format: '%Y-%m-%dT%H:%M:%S.%L%z'
time_keep: On
Expand All @@ -74,7 +75,7 @@ parsers:

- name: syslog-rfc3164
format: regex
regex: '/^\<(?<pri>[0-9]+)\>(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<host>[^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? *(?<message>.*)$/'
regex: '^\<(?<pri>[0-9]+)\>(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<host>[^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? *(?<message>.*)$'
time_key: time
time_format: '%b %d %H:%M:%S'
time_keep: On
Expand Down Expand Up @@ -105,7 +106,7 @@ parsers:
- name: cri
# https://rubular.com/r/tjUt3Awgg4
format: regex
regex: ^(?<time>[^ ]+) (?<stream>stdout|stderr) (?<logtag>[^ ]*) (?<message>.*)$
regex: '^(?<time>[^ ]+) (?<stream>stdout|stderr) (?<logtag>[^ ]*) (?<message>.*)$'
time_key: time
time_format: '%Y-%m-%dT%H:%M:%S.%L%z'
time_keep: On
Expand All @@ -117,6 +118,34 @@ parsers:
- name: kmsg-netfilter-log
# Examples: TCP: https://rubular.com/r/Q8YY6fHqlqwGI0 UDP: https://rubular.com/r/B0ID69H9FvN0tp
format: regex
regex: '^\<(?<pri>[0-9]{1,5})\>1 (?<time>[^ ]+) (?<host>[^ ]+) kernel - - - \[[0-9\.]*\] (?<logprefix>[^ ]*)\s?IN=(?<in>[^ ]*) OUT=(?<out>[^ ]*) MAC=(?<macsrc>[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}):(?<macdst>[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}):(?<ethtype>[0-9a-f]{2}:[0-9a-f]{2}) SRC=(?<saddr>[^ ]*) DST=(?<daddr>[^ ]*) LEN=(?<len>[^ ]*) TOS=(?<tos>[^ ]*) PREC=(?<prec>[^ ]*) TTL=(?<ttl>[^ ]*) ID=(?<id>[^ ]*) (D*F*)\s*PROTO=(?<proto>[^ ]*)\s?((SPT=)?(?<sport>[0-9]*))\s?((DPT=)?(?<dport>[0-9]*))\s?((LEN=)?(?<protolen>[0-9]*))\s?((WINDOW=)?(?<window>[0-9]*))\s?((RES=)?(?<res>0?x?[0-9]*))\s?(?<flag>[^ ]*)\s?((URGP=)?(?<urgp>[0-9]*))'
regex: |
(?x)
^
\<(?<pri>[0-9]{1,5})\>1\s
(?<time>[^\s]+)\s
(?<host>[^\s]+)\s
kernel\s -\s -\s -\s \[\s*[0-9\.]*\]\s
(?<logprefix>[^\s]*)\s?
IN=(?<in>[^\s]*)\s
OUT=(?<out>[^\s]*)\s
MAC= (?<macdst>[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2})
: (?<macsrc>[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2})
: (?<ethtype>[0-9a-f]{2}:[0-9a-f]{2})\s
SRC=(?<saddr>[^\s]*)\s
DST=(?<daddr>[^\s]*)\s
LEN=(?<len>[^\s]*)\s
TOS=(?<tos>[^\s]*)\s
PREC=(?<prec>[^\s]*)\s
TTL=(?<ttl>[^\s]*)\s
ID=(?<id>[^\s]*)\s
(D*F*)\s*
PROTO=(?<proto>[^\s]*)\s?
( (SPT=)? (?<sport>[0-9]*) )\s?
( (DPT=)? (?<dport>[0-9]*) )\s?
( (LEN=)? (?<protolen>[0-9]*) )\s?
( (WINDOW=)? (?<window>[0-9]*) )\s?
( (RES=)? (?<res>0?x?[0-9]*) )\s?
(?<flag>[^\s]*)\s?
( (URGP=)? (?<urgp>[0-9]*) )
time_key: time
time_format: '%Y-%m-%dT%H:%M:%S.%L%z'
6 changes: 0 additions & 6 deletions conf/parsers_ambassador.conf

This file was deleted.

10 changes: 0 additions & 10 deletions conf/parsers_cinder.conf

This file was deleted.

172 changes: 0 additions & 172 deletions conf/parsers_extra.conf

This file was deleted.

Loading