Skip to content

Instantly share code, notes, and snippets.

@gwmoura
Created September 7, 2016 16:43
Show Gist options
  • Save gwmoura/d28f6c34822a9c15a1a2b33f8eb3aa58 to your computer and use it in GitHub Desktop.
Save gwmoura/d28f6c34822a9c15a1a2b33f8eb3aa58 to your computer and use it in GitHub Desktop.
input {
udp {
port => 1984
}
}
filter {
json {
source => "message"
}
if "_jsonparsefailure" in [tags] {
mutate {
add_field => {
client => "error"
metric => "metric_error"
}
}
}
}
output {
elasticsearch {
hosts => ["http://10.240.0.2:9200"]
index => ".measure-%{client}-%{+YYYY.MM.dd}"
document_type => "%{metric}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment