Skip to content

Instantly share code, notes, and snippets.

@roycepope
Created June 20, 2016 05:27
Show Gist options
  • Save roycepope/191ee5c5d723e86e8dd7c184e7ce0733 to your computer and use it in GitHub Desktop.
Save roycepope/191ee5c5d723e86e8dd7c184e7ce0733 to your computer and use it in GitHub Desktop.
logstash/conf.d
filter {
if [type] == "mumble" {
grok {
match => { "message" => "<W>%{TIMESTAMP_ISO8601:timestamp}%{SPACE}1%{SPACE}=>%{SPACE}<%{NUMBER:id}:\(-1\)>%{SPACE}New%{SPACE}connection:%{SPACE}%{IP:clientip}:%{BASE10NUM:port}" }
}
geoip {
source => "clientip"
target => "geoip"
database => "/etc/logstash/GeoLiteCity.dat"
add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ]
add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ]
}
mutate {
convert => [ "[geoip][coordinates]", "float"]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment