Skip to content

Commit

Permalink
Merge pull request #46 from fabiogermann/master
Browse files Browse the repository at this point in the history
Compatibility with Logstash 7.2
  • Loading branch information
bitsofinfo authored Jul 10, 2019
2 parents 93b5927 + 54b7ad8 commit 62177cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 2110_filter_section_k_parse_matchedRules.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ filter {
# hack.. @see https://logstash.jira.com/browse/LOGSTASH-1331
mutate {
gsub => [ "rawSectionK", "\n", "~" ]
gsub => [ "rawSectionK", "(~+)", "~" ]
split => [ "rawSectionK" , "~" ]
}

Expand All @@ -24,7 +25,7 @@ filter {
ruby {
code => "
secRuleIds = Array.new()
matchedRules_array = event.get('matchedRules').to_hash
matchedRules_array = event.get('matchedRules')
matchedRules_array.each do |entry|
if entry.match(/^SecRule /) and entry.match(/,id:/)
secRuleIds.push(/,id:(?<ruleId>\d+)/.match(entry)[:ruleId])
Expand Down

0 comments on commit 62177cc

Please sign in to comment.