{"action":"created","issue":{"url":"https://api.github.com/repos/mart1nl/heka-geoip2-decoder/issues/1","labels_url":"https://api.github.com/repos/mart1nl/heka-geoip2-decoder/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mart1nl/heka-geoip2-decoder/issues/1/comments","events_url":"https://api.github.com/repos/mart1nl/heka-geoip2-decoder/issues/1/events","html_url":"https://github.com/mart1nl/heka-geoip2-decoder/issues/1","id":59904105,"number":1,"title":"GeoIP2 Decoder usage example","user":{"login":"Madhu1512","id":9481189,"avatar_url":"https://avatars.githubusercontent.com/u/9481189?v=3","gravatar_id":"","url":"https://api.github.com/users/Madhu1512","html_url":"https://github.com/Madhu1512","followers_url":"https://api.github.com/users/Madhu1512/followers","following_url":"https://api.github.com/users/Madhu1512/following{/other_user}","gists_url":"https://api.github.com/users/Madhu1512/gists{/gist_id}","starred_url":"https://api.github.com/users/Madhu1512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Madhu1512/subscriptions","organizations_url":"https://api.github.com/users/Madhu1512/orgs","repos_url":"https://api.github.com/users/Madhu1512/repos","events_url":"https://api.github.com/users/Madhu1512/events{/privacy}","received_events_url":"https://api.github.com/users/Madhu1512/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-05T04:36:01Z","updated_at":"2015-03-05T17:52:44Z","closed_at":null,"body":"Hi there,\r\n\r\ni used your instructions and compiled heka with geoip2-decoder plugin. now i am trying to decode the user location based on ip's from nginx access log but I have no success.\r\n\r\nHere is my toml file\r\n\r\n[Nginx-Webserver-Access]\r\ntype = \"LogstreamerInput\"\r\nlog_directory = \"/home/guest\"\r\nfile_match = 'test\\.log'\r\ndecoder = \"shipped-nginx-decoder\"\r\n\r\n[shipped-nginx-decoder]\r\ntype = \"MultiDecoder\"\r\nsubs = ['CombinedLogDecoder', 'GeoIp2Decoder']\r\n\r\n[CombinedLogDecoder]\r\ntype = \"SandboxDecoder\"\r\nfilename = \"lua_decoders/nginx_access.lua\"\r\n\r\n[CombinedLogDecoder.config]\r\ntype = \"nginx.access\"\r\nuser_agent_transform = true\r\n# combined log format\r\nlog_format = '$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\"'\r\npayload_keep = true\r\n\r\n[GeoIp2Decoder]\r\ndb_file = \"/home/guest/GeoLite2-City.mmdb\"\r\nsource_host_field = \"remote_addr\"\r\ntarget_field_prefix = \"geoip\"\r\ndns_lookup = false\r\n\r\n[ESJsonEncoder]\r\nindex = \"test-%{2006.01.02}\"\r\nes_index_from_timestamp = true\r\ntype_name = \"%{Type}\"\r\nfields = [\"Timestamp\",\"Payload\",\"HostName\",\"Fields\"]\r\n\r\n\r\n[LogOutput]\r\nmessage_matcher = \"Type == 'nginx.access'\"\r\nencoder = \"ESJsonEncoder\"\r\n\r\nPlease let me know if am doing right way."},"comment":{"url":"https://api.github.com/repos/mart1nl/heka-geoip2-decoder/issues/comments/77413338","html_url":"https://github.com/mart1nl/heka-geoip2-decoder/issues/1#issuecomment-77413338","issue_url":"https://api.github.com/repos/mart1nl/heka-geoip2-decoder/issues/1","id":77413338,"user":{"login":"Madhu1512","id":9481189,"avatar_url":"https://avatars.githubusercontent.com/u/9481189?v=3","gravatar_id":"","url":"https://api.github.com/users/Madhu1512","html_url":"https://github.com/Madhu1512","followers_url":"https://api.github.com/users/Madhu1512/followers","following_url":"https://api.github.com/users/Madhu1512/following{/other_user}","gists_url":"https://api.github.com/users/Madhu1512/gists{/gist_id}","starred_url":"https://api.github.com/users/Madhu1512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Madhu1512/subscriptions","organizations_url":"https://api.github.com/users/Madhu1512/orgs","repos_url":"https://api.github.com/users/Madhu1512/repos","events_url":"https://api.github.com/users/Madhu1512/events{/privacy}","received_events_url":"https://api.github.com/users/Madhu1512/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T17:52:44Z","updated_at":"2015-03-05T17:52:44Z","body":"Toml:\r\n\r\n[Nginx-Webserver-Access]\r\ntype = \"LogstreamerInput\"\r\nlog_directory = \"/home/guest\"\r\nfile_match = 'test\\.log'\r\ndecoder = \"CombinedLogDecoder\"\r\n\r\n[CombinedLogDecoder]\r\ntype = \"SandboxDecoder\"\r\nfilename = \"lua_decoders/nginx_access.lua\"\r\n\r\n[CombinedLogDecoder.config]\r\ntype = \"nginx.access\"\r\nuser_agent_transform = true\r\n# combined log format\r\nlog_format = '$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\"'\r\npayload_keep = true\r\n\r\n[GeoIp2Decoder]\r\ndb_file = \"/home/guest/GeoLite2-City.mmdb\"\r\nsource_host_field = \"remote_addr\"\r\ntarget_field_prefix = \"geoip\"\r\ndns_lookup = false\r\n\r\n[ESJsonEncoder]\r\nindex = \"test-%{2006.01.02}\"\r\nes_index_from_timestamp = true\r\ntype_name = \"%{Type}\"\r\nfields = [\"Timestamp\",\"Payload\",\"HostName\",\"Fields\"]\r\n\r\n\r\n[LogOutput]\r\nmessage_matcher = \"Type == 'nginx.access'\"\r\nencoder = \"ESJsonEncoder\"\r\n\r\n\r\ninput:\r\n\r\n147.179.243.30 - - [26/Aug/2014:02:14:33 -0400] \"GET /config.js HTTP/1.1\" 301 184 \"-\" \"Mozilla/4.0 (compatible;)\"\r\n\r\noutput:\r\n\r\n{\"index\":{\"_index\":\"test-2014.08.26\",\"_type\":\"nginx.access\"}}\r\n{\"Timestamp\":\"2014-08-26T06:14:33.000Z\",\"Payload\":\"147.179.243.30 - - [26/Aug/2014:02:14:33 -0400] \\u0022GET /config.js HTTP/1.1\\u0022 301 184 \\u0022-\\u0022 \\u0022Mozilla/4.0 (compatible;)\\u0022\\u000a\",\"HostName\":\"localhost\",\"body_bytes_sent\":184,\"remote_addr\":\"147.179.243.30\",\"status\":301,\"remote_user\":\"-\",\"request\":\"GET /config.js HTTP/1.1\",\"http_referer\":\"-\"}\r\n2015/03/05 12:46:17 {\"index\":{\"_index\":\"test-2014.08.27\",\"_type\":\"nginx.access\"}}\r\n"}}