Skip to content

Instantly share code, notes, and snippets.

@jippi
Created June 19, 2013 21:09
Show Gist options
  • Select an option

  • Save jippi/5818078 to your computer and use it in GitHub Desktop.

Select an option

Save jippi/5818078 to your computer and use it in GitHub Desktop.
geo json using logstash - hack edition
input {
file {
path => "/var/log/apache2/access.log.json"
format => json_event
type => apache
}
}
filter {
geoip {
source => "client"
add_tag => [ "geo" ]
add_field => [ "geo_json", "%{geoip.longitude},%{geoip.latitude}"]
}
mutate {
join => ["geo_json", ""]
tags => [ "geo" ]
}
mutate {
split => [ "geo_json", "," ]
tags => ["geo"]
}
}
output {
stdout { debug => true }
# elasticsearch_http {
# host => "es01.bownty.net"
# }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment