Hi Everyone,
I am having a hard time lately understanding how the Geo_Point type is created. I found that when I create the pipeline (using this link: https://www.elastic.co/guide/en/beats/packetbeat/current/packetbeat-geoip.html) and ship Packetbeat directly to the cluster I get the Geo_Point data type. But, if i run Packetbeat though Logstash, well that data type is never created. From my limited understanding, it seems that ES would create this when data is shipped to the pipeline, which confuses me as to why it would matter who does the shipping. Below is the config file i am using for Logstash, any help on this would be wonderful.
input {
beats {
port => 5044
}
}
filter {
if [agent][type] == "packetbeat" {
if ("xxx.xxx" in [client][ip] or "xxx.xxx" in [client][ip]) and ("xxx.xxx" in [server][ip] or "xxx.xxx" in [server][ip]) {
mutate {
add_field => {"traffic_direction" => "Internal"}
}
}
else if "xxx.xxx" in [server][ip] or "xxx.xxx" in [server][ip] {
mutate {
add_field => {"traffic_direction" => "Inbound"}
}
}
else if "xxx.xxx" in [client][ip] or "xxx.xxx" in [client][ip] {
mutate {
add_field => {"traffic_direction" => "Outbound"}
}
}
else {
mutate {
add_field => {"traffic_direction" => "Unkonwn"}
}
}
}
}
output {
elasticsearch {
hosts => "https://XXXXXXXXXXXX.us-east-1.aws.found.io:9243"
user => "elastic"
password => "xxxxxxx"
index => "%{[@metadata][beat]}-%{[@metadata][version]}"
pipeline => "geoip-info"
}
}