Skip to content

Instantly share code, notes, and snippets.

@bobmaerten
Last active August 29, 2015 14:23
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 bobmaerten/5d4e8d66bad5e02bd8e5 to your computer and use it in GitHub Desktop.
Save bobmaerten/5d4e8d66bad5e02bd8e5 to your computer and use it in GitHub Desktop.
Logstash config for use with https://github.com/pblittle/docker-logstash
input {
file {
type => "apache"
path => [ "/data/*.log" ]
start_position => "beginning"
}
}
filter {
grok {
match=> { message => "%{COMBINEDAPACHELOG}" }
}
date {
locale => "en"
match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
timezone => "Europe/Paris"
}
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
embedded => ES_EMBEDDED
host => "ES_HOST"
port => "ES_PORT"
protocol => "http"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment