I have different filters for different fields in the messages and separate them with if statements. Now I have been trying to add one final section where none of the logs match and try to filter these through generic fields. I have tried with the else statement however this adds the No_Filter to all logs. Could someone maybe assist on how to add a final filter for all logs that do not match the initial one? Here is a shortened example:
`filter {
if "10.10.10.12" in [message] {
mutate {
add_tag => "JUNIPER"
}
}
if [message] =~ "RT_FLOW_SESSION_CLOSE" {
mutate {
add_tag => "FLOWCLOSE"
}
}
if [message] =~ "RT_FLOW_SESSION_DENY" {
mutate {
add_tag => "FLOWDENY"
}
}
if [message] =~ "FLOW_REASSEMBLE_FAIL" {
mutate {
add_tag => "FLOWFAIL"
}
}
if [message] =~ "RT_SCREEN*" {
mutate {
add_tag => "RT_SCREEN"
}
}
if [message] =~ "sshd" {
mutate {
add_tag => "sshd"
}
}
else {
mutate {
add_tag => "No_Filter"
}
}'