Created
July 22, 2015 13:34
-
-
Save tbragin/eec3d30e962af9a61074 to your computer and use it in GitHub Desktop.
Logstash version tested: 1.5.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 => dots } | |
elasticsearch { | |
host => "localhost" | |
protocol => "http" | |
cluster => "elasticsearch" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment