Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Akintola/40089a21c17fec82381493ab7f1deb01 to your computer and use it in GitHub Desktop.
Save Akintola/40089a21c17fec82381493ab7f1deb01 to your computer and use it in GitHub Desktop.
input {
file {
path => "/home/user/apache/logs/acess_log"
start_position => "beginning"
}
}
filter {
grok {
match => {"message" => "%{COMBINEDAPACHELOG}"}
}
date {
match => ["timestamp", "dd/MM/yyyy:HH:mm:ss Z"]
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
}
stdout {
codec => rubydebug
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment