Created
March 15, 2017 15:09
-
-
Save betahikaru/d0fbfb6aacd857df6c4153d52ac09a2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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