Skip to content

Instantly share code, notes, and snippets.

@hiddenillusion
Created February 24, 2014 04:16
Show Gist options
  • Save hiddenillusion/9181891 to your computer and use it in GitHub Desktop.
Save hiddenillusion/9181891 to your computer and use it in GitHub Desktop.
input {
file {
start_position => "beginning"
path => "/path/to/*.log"
type => "apache"
sincedb_path => "/dev/null" # causes to re-read everytime
}
}
filter {
grok {
type => "apache"
pattern => ["%{COMBINEDAPACHELOG}"]
}
date {
type => "apache"
#18/Aug/2011:05:44:34 -0700
match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
output {
elasticsearch {
embedded => true
}
}
@bromiley
Copy link

Thanks again for the assist - I updated the blog, gave credit. Really was finagling with that for a bit, but as soon as I saw this gist, it all made sense. Coming up for air has its benefits sometimes.

Quick note, "type" and "pattern" are on the chopping block for grok..the 'if' tests and 'match' details appear to have replaced them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment