Skip to content
Merged
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions 2081_filter_section_h_convert_to_key-value.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ filter {
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

if [rawSectionH] =~ /.+/ {
# For 2.9.1+ compatibility
mutate {
# This works for most things, but if the error has things like REQUEST_HEADERS:Referer in it, it can be problematic.
# gsub => [ "rawSectionH", 'ModSecurity:', 'ModSecurity' ]
# Alternately, just drop "Apache-Error:" from rawSectionH.
gsub => [ "rawSectionH", '^Apache-Error:.*', '' ]
}
kv {
source => "rawSectionH"
field_split => "\n"
Expand Down