I would like to know if is possible to put GeoIP data (country for
exemple)
in my log access (nginx)
I enabled the GeoIP module in my nginx (configure) and i would like to
use
the “$geoip_country_name” and “$geoip_city” in my accesslog
I tried to add the two variables in my log format (main) but without
success
Most likely geo information is not available for some reason.
First of all I would recommend to check if appropriate GeoIP
databases are present on your system and loaded into nginx using the
geoip_country (for $geoip_country_name) and geoip_city (for
$geoip_city) configuration directives.
I would like to add the GeoIP data into my log access to facilitate
processing in Kibana (ELK stack)
Maybe is not the good way because i know it possible to do this with
LogStash (GeoIP Filter), and this would reduce pressure Nginx (what do
you
think ?)