Hello,
I have a (simplified) filter rule like:
filter {
if "10.170.10.6" or "10.170.11.6" or "10.1.3.23" in [host] {
grok {
match => { "message" => [
'^Accepted keyboard-interactive/pam for %{USERNAME:username} from %{IP:src_ip} port %{POSINT:src_port}' ] }
}
mutate {
add_tag => [ "hardware" ]
}
}
}
But for some reason logstash tags all events with the tag "hardware" EVEN if they are not listed as a host in "10.170.10.6" or "10.170.11.6" or "10.1.3.23".
Why is this happening? It's like the 'IF' statement is not being honored.
Any ideas on how to tag the messages only for the required hosts?
Thanks
Cam