Skip to content

Instantly share code, notes, and snippets.

@colinsurprenant
Created November 16, 2014 17:17
Show Gist options
  • Save colinsurprenant/0b089e1148cee1338ebd to your computer and use it in GitHub Desktop.
Save colinsurprenant/0b089e1148cee1338ebd to your computer and use it in GitHub Desktop.
input {
stdin { }
}
filter {
grok {
match => {
"message" => '%{IPORHOST:clientip} %{USER:ident} %{USER:auth} \[%{HTTPDATE:timestamp}\] "%{WORD:verb} %{DATA:request} HTTP/%{NUMBER:httpversion}" %{NUMBER:response:int} (?:-|%{NUMBER:bytes:int}) %{QS:referrer} %{QS:agent}'
}
}
date {
match => [ "timestamp", "dd/MMM/YYYY:HH:mm:ss Z" ]
locale => en
}
geoip {
source => "clientip"
}
useragent {
source => "agent"
target => "useragent"
}
}
output {
# stdout { codec => rubydebug }
elasticsearch {
protocol => "http"
host => "localhost"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment