Hello all,
I'm very new to elastic, so please bear with me. I'm trying to get a data type 'geo_point' in ES 6.3 via a template referenced in my logstash pipeline. I'm getting geo data populating in elasticsearch, just not a geo_point data type that's usable with the coordinate map. Here's my ES template:
{
"template" : "paloalto-",
"version" : 60001,
"settings" : {
"index.refresh_interval" : "5s"
},
"mappings" : {
"default" : {
"dynamic_templates" : [ {
"message_field" : {
"path_match" : "message",
"match_mapping_type" : "string",
"mapping" : {
"type" : "text",
"norms" : false
}
}
}, {
"string_fields" : {
"match" : "",
"match_mapping_type" : "string",
"mapping" : {
"type" : "text", "norms" : false,
"fields" : {
"keyword" : { "type": "keyword", "ignore_above": 256 }
}
}
}
} ],
"properties" : {
"@timestamp": { "type": "date"},
"@version": { "type": "keyword"},
"DestinationGeo" : {
"dynamic": true,
"properties" : {
"ip": { "type": "ip" },
"location" : { "type" : "geo_point" },
"latitude" : { "type" : "half_float" },
"longitude" : { "type" : "half_float" }
}
}
}
}
}
}
And here's the relevant section from my pipeline:
if [DestinationAddress] and [DestinationAddress] !~ "(^127.0.0.1)|(^10.)|(^172.1[6-9].)|(^172.2[0-9].)|(^172.3[0-1].)|(^192.168.)|(^169.254.)" {
geoip {
database => "/opt/logstash/GeoLite2-City.mmdb"
source => "DestinationAddress"
target => "DestinationGeo"
}
#Delete 0,0 in DestinationGeo.location if equal to 0,0
if ([DestinationGeo.location] and [DestinationGeo.location] =~ "0,0") {
mutate {
replace => [ "DestinationAddress.location", "" ]
}
}
}
output {
if [Type] == "TRAFFIC" {
elasticsearch {
index => "paloalto-traffic-%{DeviceName}-%{+YYYY.MM.dd}"
template => "/opt/logstash/elasticsearch-template.json"
template_overwrite => true
}
}
}
I'm not seeing any errors, so I assume I've misunderstood a piece of this. Can anyone see anything obvious missing from this configuration that would prevent the geo_point data field from populating? Do I need to install the geoip plugin on all nodes before this field will show up?