Created
August 5, 2018 12:49
-
-
Save behroozam/f8c4cb8813b799e9b8ef591aa6bf2dc4 to your computer and use it in GitHub Desktop.
logstash to elasticssearch gelf example
This file contains hidden or 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 { | |
gelf { | |
port => 12201 | |
type => gelf | |
} | |
} | |
filter { | |
grok { | |
match => { "message" => "%{IPORHOST:remote_addr} - %{USERNAME:remote_user} \[%{HTTPDATE:time_local}\] \"%{DATA:request}\" %{INT:status} %{NUMBER:bytes_sent} \"%{DATA:http_referer}\" \"%{DATA:http_user_agent}\"" } | |
} | |
geoip { | |
source => "remote_addr" | |
} | |
} | |
output { | |
elasticsearch { | |
index => "yourstack-%{+YYYY.MM.dd}" | |
hosts => "elasticsearch:9200" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment