Last active
August 29, 2015 14:10
-
-
Save nboire/85e4159dc7eccba39ca9 to your computer and use it in GitHub Desktop.
docker-logstash.conf
This file contains hidden or 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 { | |
type => "stdin-type" | |
} | |
file { | |
type => "apache-access" | |
path => [ "/var/log/apache/access/*" ] | |
start_position => "beginning" | |
} | |
} | |
filter { | |
if [type] == "apache-access" { | |
grok { | |
match => { "message" => "%{COMBINEDAPACHELOG}" } | |
} | |
} | |
date { | |
# Try to pull the timestamp from the 'timestamp' field (parsed above with | |
# grok). The apache time format looks like: "18/Aug/2011:05:44:34 -0700" | |
match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ] | |
} | |
} | |
output { | |
stdout { | |
codec => rubydebug | |
} | |
elasticsearch { | |
embedded => true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment