Skip to content

Commit e1ebfc2

Browse files
committed
Create Geopoint mapping in ES
1 parent 7b43a97 commit e1ebfc2

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

fluentd-configmap.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,13 @@ data:
439439
backend_library geoip2_c
440440
441441
<record>
442-
geoip.city ${city.names.en["remote_ip"]}
443-
geoip.latitude ${location.latitude["remote_ip"]}
444-
geoip.longitude ${location.longitude["remote_ip"]}
442+
#geoip.location_properties '{ "lat" : ${location.latitude["remote_ip"]}, "lon" : ${location.longitude["remote_ip"]} }'
443+
#geoip.location_string ${location.latitude["remote_ip"]},${location.longitude["remote_ip"]}
444+
geoip.location_array '[${location.longitude["remote_ip"]},${location.latitude["remote_ip"]}]'
445445
geoip.country ${country.iso_code["remote_ip"]}
446446
geoip.country_name ${country.names.en["remote_ip"]}
447447
geoip.postal_code ${postal.code["remote_ip"]}
448+
geoip.city ${city.names.en["remote_ip"]}
448449
</record>
449450
450451
skip_adding_null_record true
@@ -494,5 +495,12 @@ data:
494495
"settings": {
495496
"number_of_shards": 3,
496497
"number_of_replicas": 0
498+
},
499+
"mappings": {
500+
"_default_": {
501+
"properties" : {
502+
"geoip.location_array": { "type": "geo_point"}
503+
}
504+
}
497505
}
498506
}

0 commit comments

Comments
 (0)