logstash-filter-geoip icon indicating copy to clipboard operation
logstash-filter-geoip copied to clipboard

Add locales support

Open daggerjames opened this issue 5 years ago • 2 comments

Add locale support for city_name and country_name etc.

daggerjames avatar Dec 13 '19 14:12 daggerjames

I have signed CLA :)

daggerjames avatar Dec 13 '19 14:12 daggerjames

Thanks for submitting this enhancement. It is a valid idea to support multilingual names in this plugin. Instead of having a city name in one language, enrich the event with multiple languages that user interest. config

geoip {
  locales => [en, de, ja]
}

output

"geo" => {
    "timezone" => "America/Chicago",
    "country_name" => "United States",
    "location" => {
        "lat" => 37.751,
        "lon" => -97.822
    },
    "continent_code" => "NA",
    "country_iso_code" => "US"
    "name_with_locales" => {
        "country_name" => {
            "en" => "United States",
            "de" => "USA",
            "ja" => "アメリカ"
        }
    }
}

The above proposal keeps the structure backward compatible with Elastic Common Schema, which has assigned geo.* for Geo Fields. Keeping geo.country_name in English make search result in Kibana or Elasticsearch more predictable.

This proposal needs wider discussion with the team. I will keep this thread updated.

kaisecheng avatar Oct 25 '21 13:10 kaisecheng