Skip to content

Instantly share code, notes, and snippets.

@trondhindenes
Created August 14, 2016 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trondhindenes/ae7d3bfbd781a2f5aebb206050fa900c to your computer and use it in GitHub Desktop.
Save trondhindenes/ae7d3bfbd781a2f5aebb206050fa900c to your computer and use it in GitHub Desktop.
input {
http {
port => "8081"
codec => "json"
}
}
filter {
}
output {
if "_grokparsefailure" in [tags] {
elasticsearch { hosts => ["172.16.0.7:9200"]
index => "logstash-http-input-test-%{+YYYY.MM}"
}
}
else {
elasticsearch { hosts => ["172.16.0.7:9200"]
index => "logstash-http-input-test-%{+YYYY.MM}"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment