This repository has been archived by the owner on May 12, 2021. It is now read-only.
METRON-680: GeoLiteDatabase incorrectly using country geoname_id instead of city #433
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Swaps out country's geoname_id for city's geoname_id. Both ids are the same in format (they're the ids for the geonames.org dataset).
The only direct effect I know of from this is the Kibana dashboard uses this field for unique locations (so changing what feeds this changes the dashboard output). The main wrinkle is that city can be unpopulated, even though a country exists (e.g. if an IP is just assigned to the U.S., it may not have a city). This isn't always true that (at least one IP range for Japan appears to fill in Japan as the city's geoname id).
I'm opening the PR with just the direct change, but it's definitely open to discussion if we want to adjust.