As my log have multiple pattern I need to use multiple dissect pattern so that if one pattern fails to recognize the log other can capture. Following pseudo configuration works,
"message" => "pattern1"
Or
"message" => "pattern2"
But following configuration is not working,
"message" => ["pattern1", "pattern2"]
Does dissect support these kinds of match?
I saw something like this on @Christian_Dahlqvist’s answer on the following link,
Especially in the following part,
dissect {
break_on_match => true
mapping => {
"message" => [
"%{ts->} %{+ts} %{+ts} %{host} %{command}(pam_unix)[%{pid}]: %{action} %{+action} for user %{user} by (uid=%{uid})%{}",
"%{ts->} %{+ts} %{+ts} %{host} %{command}(pam_unix)[%{pid}]: %{action} %{+action} for user %{user}",
"%{ts->} %{+ts} %{+ts} %{host} %{command}(pam_unix)[%{pid}]: %{action} %{+action}; %{params}"
}
}