Skip to content

Commit 62177cc

Browse files
authored
Merge pull request #46 from fabiogermann/master
Compatibility with Logstash 7.2
2 parents 93b5927 + 54b7ad8 commit 62177cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

2110_filter_section_k_parse_matchedRules.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ filter {
1414
# hack.. @see https://logstash.jira.com/browse/LOGSTASH-1331
1515
mutate {
1616
gsub => [ "rawSectionK", "\n", "~" ]
17+
gsub => [ "rawSectionK", "(~+)", "~" ]
1718
split => [ "rawSectionK" , "~" ]
1819
}
1920

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

0 commit comments

Comments
 (0)