logstash 自定義生成 geoip/自定義的經緯度轉換為 geo_point 型別
阿新 • • 發佈:2018-12-19
geo_point 的幾種型別 首先將經緯度的值賦給新的變數 geoip.location,然後將其轉化為float型別,要注意的是【經度,緯度】,陣列格式經度在前。
mutate { add_field => ["[geoip][latitude]", "%{[lat]}"] add_field => ["[geoip][longitude]", "%{[lon]}"] add_field => ["[geoip][location]", "%{[lon]}"] add_field => ["[geoip][location]", "%{[lat]}"] } mutate { convert => ["[geoip][latitude]", "float"] } mutate { convert => ["[geoip][longitude]", "float"] } mutate { convert => ["[geoip][location]", "float"] }