Skip to content

Instantly share code, notes, and snippets.

@djuang1
Created October 26, 2015 14:09
Show Gist options
  • Save djuang1/ce8a9d298b0b81f6353f to your computer and use it in GitHub Desktop.
Save djuang1/ce8a9d298b0b81f6353f to your computer and use it in GitHub Desktop.
MuleSoft ELK Plugin Logstash *.conf File
input {
file {
type => "events"
path => [ "/usr/local/mule/logs/events.log" ]
codec => json
}
file {
type => "analytics"
path => [ "/usr/local/mule/logs/gw-http-events.log" ]
codec => json
}
}
filter {
json {
source => "message"
}
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"]
}
if "_jsonparsefailure" in [tags] {
mutate {
remove_tag => "_jsonparsefailure"
}
}
}
output {
stdout { codec => rubydebug }
elasticsearch { host => localhost }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment