filter{
if([messageTopic] == "minos2_useraction"){
# codec=>rubydebug
mutate{
split=>["message"," "]
add_field => {
"eventName" => "%{[message][0]}"
}
add_field => {
"eventId" => "%{[message][1]}"
}
add_field => {
"ruleId" => "%{[message][2]}"
}
add_field => {
"serialNumber" => "%{[message][3]}"
}
add_field => {
"mainBody" => "%{[message][4]}"
}
add_field => {
"ip" => "%{[message][5]}"
}
remove_field => ["message"]
# if([ip] != "-") {
# geoip {
# source => "ip"
# target => "geoip"
# }
# }
}
# if([ip] != "-") {
# geoip {
# source => "ip"
# target => "geoip"
# }
}
我的filter设置如上,先获取ip,然后将ip值不为“-”的转换为geoip,但是上面两种配置方式都是错的,求大神指导
1 个回复
wyntergreg
赞同来自: