Open dabdine-r7 opened 5 years ago
Technically speaking, for he compat filter, we should set the country code to A1 or A2 based on the values of the geoip2 traits object. The geoip2 what's new link details this:
@tsellers-r7 any chance we can get this merged :)
Still needs documentation, likely needs to be tested again against the DAP bats tests jhart wrote.
Hurm, I thought we rm -rf
this whole repo.. 😈
I'll try to take a look soonish. Lemme know if there is any priority attached to it.
What is this?
This is a work in progress patch to support the Maxmind GeoIP2 database.
This patch introduces two new filters:
geo_ip2_city
andgeo_ip2_isp
, which replace the now deprecatedgeo_ip
andgeo_ip_org
filters, respectively.Geoip files have now been re-organized to allow for reuse of common features:
GeoIPDecoder
,FilterGeoIP
and the New method)geo_ip
andgeo_ip_org
geo_ip2_city
andgeo_ip2_isp
. Since GeoIP2 supports multiple languages, you can specify which language you want using theGEOIP2_LANGUAGE
environment variable (defaults to "en", see https://support.maxmind.com/geoip-faq/geoip2-and-geoip-legacy-implementation/what-languages-does-geoip2-support/). The path to the database can be specified withGEOIP2_CITY_DATABASE_PATH
forgeo_ip2_city
, orGEOIP2_ISP_DATABASE_PATH
forgeo_ip2_isp
, respectively.Example output:
An example of the
geo_ip2_legacy_compat
filter:TODO
[ ] Add more tests (integration, unit) [ ] Update documentation [x] Add backward compatibility filter for transforming geoip2 fields back to the geoip legacy field format (likely to be named
geo_ip2_legacy_compat
)