I have syslog network messages successfully parsed with logstash,
event 1 has [system][syslog][hostname]=10.20.0.3
event 2 has [system][syslog][hostname]=10.111.0.3
however the following statements fail to match for 10.111.x.x, and never uses the last else statement.
any ideas?
I'm trying to match as follows
if [system][syslog][hostname] =~ /10\.111\..*/ {
mutate {
add_field => {
"[geoip][location][latitude]" => "77.777777"
"[geoip][location][longitude]" => "77.777777"
}
}
}
else if [system][syslog][hostname] =~ /10\.20\./ {
mutate {
add_field => {
"[geoip][location][latitude]" => "88.888888"
"[geoip][location][longitude]" => "88.888888"
}
}
}
else {
mutate {
add_field => {
"[geoip][location][latitude]" => "99.999999"
"[geoip][location][longitude]" => "99.999999"
}
}
}