Skip to content

Instantly share code, notes, and snippets.

@psychonaut
Last active April 14, 2017 13:35
Show Gist options
  • Save psychonaut/2d36272d38cebc42fc602232ccd977fe to your computer and use it in GitHub Desktop.
Save psychonaut/2d36272d38cebc42fc602232ccd977fe to your computer and use it in GitHub Desktop.
logstash 5.* http input acting as elasticsearch
input {
http {
port => 9200
tags => ["input-http-elasticsearch"]
id => "input-http-9200"
codec => "json"
}
}
filter {
if "input-http-elasticsearch" in [tags] {
mutate {
remove_field => ["headers"]
remove_tag => ["input-http-elasticsearch"]
}
ruby {
code => "if event.get('message').respond_to?('join') then event.set('message', event.get('message') * %(\n)) end"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment