Created
October 6, 2021 20:55
-
-
Save Akintola/40089a21c17fec82381493ab7f1deb01 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 => "/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