I'm trying to filter out the GeoIp from the log I'm ingesting into Elasticsearch.
The log pattern is like this:
{"@message":"Successful api request","@timestamp":"2018-01-22T08:24:00.162Z","@fields":{"origin":"193.xx.xx.xxx","environment":"production_beta","label":"askquestiongui","level":"info"}}
I've tested with this filter setting without any luck:
filter { geoip { source => "@fields.origin.keyword" } }
Output:
{ "@version" => "1", "http_poller_metadata" => { "request" => { "headers" => { "Accept" => "application/json", "x-lm-api" => "xxxxxxxxxxxxxxxxxxxxxxxxx" }, "method" => "get", "url" => "http://xx.xx.xx/xx/log" }, "response_headers" => { "date" => "Mon, 22 Jan 2018 11:21:05 GMT", "x-global-transaction-id" => "139098999", "last-modified" => "Mon, 22 Jan 2018 11:20:05 GMT", "x-backside-transport" => "OK OK", "transfer-encoding" => "chunked", "x-powered-by" => "Express", "connection" => "Keep-Alive", "content-type" => "text/plain; charset=UTF-8", "etag" => "W/\"5948-1611d98bf6a\"", "cache-control" => "public, max-age=0" }, "code" => 200, "response_message" => "OK", "times_retried" => 0, "runtime_seconds" => 5.095, "name" => "test", "host" => "elastic6" }, "@message" => "Successful api request", "@timestamp" => 2018-01-22T11:20:05.226Z, "@fields" => { "environment" => "production_beta", "label" => "askquestiongui", "level" => "info", "origin" => "193.xx.xx.xxx" }, "tags" => [ [0] "_geoip_lookup_failure" ] }
I'm using Elasticsearch 5.6.4 and ingest-geoip is installed.