Created
July 18, 2016 15:10
-
-
Save mdesanti/dd6f9b6eb744aee6dbb01596d18fb3aa to your computer and use it in GitHub Desktop.
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
files: | |
"/etc/logstash/conf.d/rails.conf": | |
content: | | |
input { | |
file { | |
path => "/var/log/puma/rails_logstasher.log" | |
type => "rails_logs" | |
codec => json { | |
charset => "UTF-8" | |
} | |
} | |
} | |
filter { | |
geoip { | |
source => "ip" | |
target => "geoip" | |
database => "/etc/logstash/GeoLiteCity.dat" | |
add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ] | |
add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ] | |
} | |
} | |
output { | |
elasticsearch { | |
hosts => 'your-elasticsearch-service-url' | |
document_id => "%{request_id}" | |
timeout => 15 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment