flume-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Hardy <dha...@figarocms.fr>
Subject Geolocalisation plugin
Date Thu, 17 Nov 2011 15:52:12 GMT
Hi there,

We have begun a small plugin to geolocate IP based on MaxMind GeoIP 
database ( http://www.maxmind.com/app/ip-location )
Datafile is not included but there is a Free (as a beer) Lite version 
downloadable.
Java API jar form MaxMind is olso required (cf 
http://www.maxmind.com/app/java ; jar creation is explained in the 
readme file)

You can find the plugin on this github repo :
https://github.com/figarocms/flume-extractor-geoip

It make able to get IP from a event field (default is "ip") and apend 
several "geoip.*" fields to event with geoloc informations.

Feel free to comment it.

Example of usage :

echo "test of IP 90.16.13.14 for geolocalisation" | flume node_nowatch 
-1 -n me -c 
'me:console|regex("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}",0,"meta.ip") 
GeoIPExtractor("/GeoLiteCity.dat","meta.ip") console;'

desktop [INFO <DATE> ] { geoip.city : Saint-sauvant } { 
geoip.countryCode : FR } { geoip.countryName : France } { geoip.latitude 
: B6�� } { geoip.longitude : � } { meta.ip : 90.16.13.14 } test of IP 
90.16.13.14 for geolocalisation

Best regards,

-- 
Damien

Mime
View raw message