Reputation: 113
How to stash input values such as lat and lon to create geoshape point before output to elasticsearch example need to output to elasticsearch as "location": { "type": "point", "coordinates": [-84.636,33.33] } For generating the above what code what filter should add in logstash conf file?
Upvotes: 0
Views: 451
Reputation: 113
guys got the answer for this after a long search. its like this If you want to stash lat lon in to elasticsearch which already has mapping as
"location": {
"type": "geo_shape"
}
On your conf file in logstash you will have to use the filter mutate
mutate {
add_field => { "[location][type]" => "point"
"[location][coordinates]" => ["%{LocationDataLng}",
"%{LocationDataLat}"]
}
}
Upvotes: 0