-
-
Save mensoh/932968e45395420a0e28aa1b7a13c0e0 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/bitnami/logs/config-access.log.*" | |
start_position => "beginning" | |
} | |
} | |
filter { | |
grok { | |
match => [ | |
"message" , "%{COMBINEDAPACHELOG}+%{GREEDYDATA:extra_fields}", | |
"message" , "%{COMMONAPACHELOG}+%{GREEDYDATA:extra_fields}" | |
] | |
overwrite => [ "message" ] | |
} | |
mutate { | |
convert => ["response", "integer"] | |
convert => ["bytes", "integer"] | |
convert => ["responsetime", "float"] | |
} | |
geoip { | |
source => "clientip" | |
target => "geoip" | |
add_tag => [ "apache-geoip" ] | |
} | |
date { | |
match => [ "timestamp" , "dd/MMM/YYYY:HH:mm:ss Z" ] | |
remove_field => [ "timestamp" ] | |
} | |
useragent { | |
source => "agent" | |
} | |
} | |
output | |
{ | |
stdout { codec => rubydebug } | |
elasticsearch | |
{ | |
hosts => ["127.0.0.1:9200"] | |
document_id => "%{logstash_checksum}" | |
index => "logstash-%{+YYYY.MM.dd}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment