I have two types of logs messages from one source. I am trying to parse them using configuration like this:
filter {
if [type] == "my_type" {
grok {
match => [ "message", "field1:" ]
break_on_match => false
add_tag => "field1_message"
}
}
if [type] == "my_type" {
grok {
match => [ "message", "field2:" ]
break_on_match => false
add_tag => "field2_message"
}
}
}
Field1 and Field2 are uniq for each type. My regex and and patterns are correct. When I run this filter, only first part of filter is matched and from second I just receive _grokparsefailure. Can you help me with this?