Skip to content

Instantly share code, notes, and snippets.

@nboire
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nboire/85e4159dc7eccba39ca9 to your computer and use it in GitHub Desktop.
Save nboire/85e4159dc7eccba39ca9 to your computer and use it in GitHub Desktop.
docker-logstash.conf
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