Skip to content

Commit

Permalink
style: 💄 make modsec debug logs more readable (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskaransarkaria authored Nov 26, 2024
1 parent c88b796 commit 62c8bab
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion configmap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ resource "kubernetes_config_map" "fluent-bit-config" {
Merge_Log_Key log_processed
Buffer_Size 5MB
[FILTER]
Name parser
Parser modsec-debug-logs
Match cp-ingress-modsec-debug.*
Key_Name log
[FILTER]
Name lua
Match cp-ingress-modsec-stdout.*
Expand Down Expand Up @@ -186,7 +192,13 @@ resource "kubernetes_config_map" "fluent-bit-config" {
Regex ^(?<time>[^ ]+) (?<stream>stdout|stderr) (?<logtag>[^ ]*) (?<log>.*)$
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L%z
[PARSER]
# https://rubular.com/r/DjPmoX5HnQMesk
Name modsec-debug-logs
Format regex
Regex ^(?<debug_uid>\[\d+\.\d+\]) (?<uri>\[.*\]) (?<log>.*)$
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L%z
[PARSER]
Name generic-json
Format json
Expand Down

0 comments on commit 62c8bab

Please sign in to comment.