Skip to content

Instantly share code, notes, and snippets.

@grrywlsn
Created October 17, 2014 15:37
Show Gist options
  • Save grrywlsn/65751bd89540df6d7e3d to your computer and use it in GitHub Desktop.
Save grrywlsn/65751bd89540df6d7e3d to your computer and use it in GitHub Desktop.
Logstash filtering for Apache
input {
redis {
host => '127.0.0.1'
port => '6379'
data_type => 'list'
key => 'logstash'
}
}
filter {
grok {
type => "apache-access"
pattern => "%{COMBINEDAPACHELOG}"
}
kv {
field_split => "&?"
}
date {
locale => 'en'
match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
output {
elasticsearch {
host => localhost
protocol => http
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment