Trying send bulk index request through a logstash pipeline using the http input with es_bulk codec. Having an issue where only the last event in the payload is being passed through. Sending the same payload to elasticsearch directly works fine. Tried
Sample payload stored in data.json:
{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
{ "field1" : "value1" }
{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "2" } }
{ "field1" : "value2" }
Sample logstash config:
input {
http {
port => 8080
codec => es_bulk
}
}
filter {}
output {
file {
path => "/tmp/logstash.txt"
}
}
Post:
curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data-binary "@data.json" localhost:8080/_bulk