Skip to content

Instantly share code, notes, and snippets.

@paramadeep
Created May 18, 2015 02:24
Show Gist options
  • Save paramadeep/d36f2c931edd34803137 to your computer and use it in GitHub Desktop.
Save paramadeep/d36f2c931edd34803137 to your computer and use it in GitHub Desktop.
Lagstash Config for Dropwizard (Jetty) Logs
input
{
file
{
path=>"<log file dir>/*.log"
start_position=>"beginning"
}
}
filter {
grok {
match => { "message" => '%{IPORHOST:clientip} %{USER:ident} %{USER:auth} \[%{HTTPDATE:time}\] "(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})" %{NUMBER:response} (?:%{NUMBER:bytes}|-) %{QS:referrer} %{QS:agent}' }
}
date {
match => ["time", "dd/MMM/YYYY:HH:mm:ss Z"]
locale => "en"
}
}
output
{
elasticsearch
{
host => localhost
protocol => "http"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment