Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lat/lon to GeoIP data #513

Open
johnhtodd opened this issue Dec 15, 2023 · 0 comments
Open

Add lat/lon to GeoIP data #513

johnhtodd opened this issue Dec 15, 2023 · 0 comments

Comments

@johnhtodd
Copy link

Is your feature request related to a problem? Please describe.
Having the city, country, region of the origin IP is very useful, but for direct mapping it would be even more useful to have latitude and longitude (lat / lon) added into the data set for immediate mapping instead of having to do a post-transmission lookup again to turn the city/province/nation data back into a lat/lon for mapping use.

This could be located in a mmdb-city-file format, and could even use the same file as the City lookup (but for flexibility, a separate file should be able to be specified - re-using the mmdb-city-file is not a good idea.) It seems wise to make this an optional data set, as it is not always needed and could be added in the same way that the other GeoIP fields are added as optional data to insert in the geoip data block.

Describe the solution you'd like

Configuration:

    transforms:
      geoip:
        mmdb-country-file: "/var/lib/maxmind/GeoIP2-Country.mmdb"
        mmdb-city-file: "/var/lib/maxmind/GeoIP2-City.mmdb"
        mmdb-asn-file: "/var/lib/maxmind/GeoLite2-ASN.mmdb"
        mmdb-coordinate-file: "/var/lib/maxmind/GeoIP2-City.mmdb"

Result:

{
  "geoip": {
    "city": "Portland",
    "continent": "NA",
    "country-isocode": "US",
    "as-number": "7922",
    "as-owner": "Comcast"
    "lat": "45.515"
    "lon": "-122.687"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants