Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save betahikaru/d0fbfb6aacd857df6c4153d52ac09a2c to your computer and use it in GitHub Desktop.
Save betahikaru/d0fbfb6aacd857df6c4153d52ac09a2c to your computer and use it in GitHub Desktop.
input {
file {
path => "LOG_PATH/access_log"
}
}
filter {
if [path] =~ "access" {
mutate {
replace => { "type" => "apache_access" }
}
grok {
match => {
"message" => "%{COMBINEDAPACHELOG}"
}
}
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
locale => "en"
}
}
output {
elasticsearch {
hosts => ["https://yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.ap-northeast-1.es.amazonaws.com"]
}
stdout {
codec => rubydebug
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment