eris::log::context::GeoIP - Apply MaxMind GeoIPv2 Data to events
version 0.005
Use this module to tag geo location data to events with matching field names. You'll probably need to configure the geo_db attribute.
geo_db
Defaults to 1000, run last.
Defaults to '_exists_'
A regex matching any string ending in '_ip'.
The file location for the GeoIPv2 Databases, defaults to '/usr/share/GeoIP/GeoLite2-City.mmdb'. Set in the config:
--- contexts: configs: GeoIP: geo_db: '/var/lib/geoip/GeoIP2-Full.mmdb'
This is an instance of a GeoIP2::Database::Reader used to lookup GeoIP data for an IP
Should warnings about this context failing initialization be displayed.
Defaults to false so you won't get spew when the geo_db is missing.
Inspects the eris::log context for any fields ending in '(.*)_ip'. If found, a new key "${1}_geoip" is created to contain a HashRef with the following data:
city, country, continent, location, traits, postal_code
The only special elements being, location which is "latitude,longitude" and traits, which is an array containing the following possible tags: anonymous, proxy, and/or satellite.
eris::log::contextualizer, eris::role::context, GeoIP2::Database::Reader
Brad Lhotsky <brad@divisionbyzero.net>
This software is Copyright (c) 2015 by Brad Lhotsky.
This is free software, licensed under:
The (three-clause) BSD License
To install eris, copy and paste the appropriate command in to your terminal.
cpanm
cpanm eris
CPAN shell
perl -MCPAN -e shell install eris
For more information on module installation, please visit the detailed CPAN module installation guide.