Code Monkey home page Code Monkey logo

heka-geoip2-decoder's People

Contributors

loginoff avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

robison

heka-geoip2-decoder's Issues

GeoIP2 Decoder usage example

Hi there,

i 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.

Here is my toml file

[Nginx-Webserver-Access]
type = "LogstreamerInput"
log_directory = "/home/guest"
file_match = 'test.log'
decoder = "shipped-nginx-decoder"

[shipped-nginx-decoder]
type = "MultiDecoder"
subs = ['CombinedLogDecoder', 'GeoIp2Decoder']

[CombinedLogDecoder]
type = "SandboxDecoder"
filename = "lua_decoders/nginx_access.lua"

[CombinedLogDecoder.config]
type = "nginx.access"
user_agent_transform = true

combined log format

log_format = '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'
payload_keep = true

[GeoIp2Decoder]
db_file = "/home/guest/GeoLite2-City.mmdb"
source_host_field = "remote_addr"
target_field_prefix = "geoip"
dns_lookup = false

[ESJsonEncoder]
index = "test-%{2006.01.02}"
es_index_from_timestamp = true
type_name = "%{Type}"
fields = ["Timestamp","Payload","HostName","Fields"]

[LogOutput]
message_matcher = "Type == 'nginx.access'"
encoder = "ESJsonEncoder"

Please let me know if am doing right way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.