Debian Codegraph @

hub1/parsers/s01-parse/baudneo/gotify-logs.yaml

raw
1 #filter: '1 == 1' # For hub tests
2 filter: evt.Parsed.program == "gotify" # Production
3 #debug: true
4 onsuccess: next_stage
5 name: baudneo/gotify-logs
6 description: parser for Gotify server
7 pattern_syntax:
8 GOTIFY_SEPERATOR: '%{SPACE}\|%{SPACE}'
9 GOTIFY_401: '^\[GIN\]\s*%{YEAR:year}/%{MONTHNUM:month}/%{NUMBER:day}%{SPACE}[-]%{SPACE}%{TIME:time}%{GOTIFY_SEPERATOR}401%{GOTIFY_SEPERATOR}%{DATA:request_time_took}%{GOTIFY_SEPERATOR}%{IP:source_ip}%{GOTIFY_SEPERATOR}%{WORD:request_type}%{SPACE}"%{DATA:endpoint}"'
10 nodes:
11 - grok:
12 name: "GOTIFY_401"
13 apply_on: message
14 statics:
15 - meta: log_type
16 value: gotify_failed_auth
17 - target: StrTime
18 expression: |-
19 evt.Parsed.year+ "/" + evt.Parsed.month + "/" + evt.Parsed.day + " " + evt.Parsed.time
20 statics:
21 - meta: source_ip
22 expression: evt.Parsed.source_ip