# How can i send multiple json messages to logstash using http plugin?

**URL:** https://discuss.elastic.co/t/how-can-i-send-multiple-json-messages-to-logstash-using-http-plugin/202592
**Category:** Logstash
**Created:** [October 7, 2019, 9:05pm UTC](https://discuss.elastic.co/t/how-can-i-send-multiple-json-messages-to-logstash-using-http-plugin/202592 "2019-10-07T21:05:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rajkumar.m](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rajkumar.m](https://discuss.elastic.co/u/rajkumar.m)
#### Post date: [October 7, 2019, 9:05pm UTC](https://discuss.elastic.co/t/how-can-i-send-multiple-json-messages-to-logstash-using-http-plugin/202592/1 "2019-10-07T21:05:27Z")

</div>

## I am trying to send multiple json messages to logstash using http plugin, but i could see only the first message on kibana. please help. below is the my plugin.

input {  
http {  
port =\> XXXX

```
   }

```

## }

## I am trying to push with the curl curl -H "content-type: application/json" -XPUT '[http://Logstash](http://Logstash):XXXX/\_bulk' -d @/test.json

## Contents of test.json: { "index\_id" : "test\_index", "FIELD1" : "TEST1", "FIELD2" : "TEST2" } { "index\_id" : "test\_index", "FIELD1" : "XXXXX", "FIELD2" : "YYYYYY" }

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [October 9, 2019, 2:44pm UTC](https://discuss.elastic.co/t/how-can-i-send-multiple-json-messages-to-logstash-using-http-plugin/202592/2 "2019-10-09T14:44:01Z")

</div>

If you send it an array it will output multiple events.

```
[{ "index_id" : "test_index", "FIELD1" : "TEST1", "FIELD2" : "TEST2" },
{ "index_id" : "test_index", "FIELD1" : "XXXXX", "FIELD2" : "YYYYYY" }]

```

Without it being an array it appears to ignore everything except the first JSON object.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 6, 2019, 2:44pm UTC](https://discuss.elastic.co/t/how-can-i-send-multiple-json-messages-to-logstash-using-http-plugin/202592/3 "2019-11-06T14:44:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
