Hi,
My use case is to match one of the regex using multiple grok in one filter.Tried using multiple filter but not matching one of the pattern even though that pattern is present in input.
Here is my filter
filter
{
json
{
source => "message"
target => "message"
}
if[type] == 'dmesg'
{
grok
{
match => { logs => "killed by TERM signal" }
add_field => {"tagName"=>"GENERIC_EMERGENCY"}
add_field => {"module" => "null"}
}
grok
{
match => { logs => "^<1>" }
add_field => {"tagName"=>"GENERIC_ALERT"}
add_field => {"module" => "null"}
}
grok
{
match => { logs => "^<3>" }
add_field => {"tagName"=>"GENERIC_ERROR"}
add_field => {"module" => "null"}
}
grok
{
match => { logs => "^<4>" }
add_field => {"tagName"=>"GENERIC_WARNING"}
add_field => {"module" => "null"}
}
}
if "_grokparsefailure" in [tags]
{
drop { }
}
}