While I'd expected multiple add_field lines to work, I'd do like this (which is also less repetitive):
filter {
mutate {
add_field => {
"location_name" => "Location_A"
"[netflow][ipv4_dst_host]" => "%{[netflow][ipv4_dst_addr]}"
"[netflow][ipv4_src_host]" => "%{[netflow][ipv4_src_addr]}"
}
}
}
Doesn't work.
It's easier to help if you elaborate more. Logstash doesn't start? Logstash works but doesn't do what you want? Something else?
By the way, on
add_field => [ “[netflow][ipv4_src_host]","%{[netflow][ipv4_src_addr]}" ]
one of the quotes is incorrect (it's a curly instead of a stright one). That might upset Logstash.