# Json\_batch: I need set the buffer size and flush time

**URL:** <https://discuss.elastic.co/t/json-batch-i-need-set-the-buffer-size-and-flush-time/191090>\
**Category:** Logstash\
**Created:** [July 17, 2019, 9:01pm UTC](https://discuss.elastic.co/t/json-batch-i-need-set-the-buffer-size-and-flush-time/191090 "2019-07-17T21:01:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DANIEL\_CORTES\_FERNAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_cortes_fernan/32/50407_2.png) [@DANIEL\_CORTES\_FERNAN](https://discuss.elastic.co/u/DANIEL_CORTES_FERNAN)\
**Post date:** [July 17, 2019, 9:01pm UTC](https://discuss.elastic.co/t/json-batch-i-need-set-the-buffer-size-and-flush-time/191090/1 "2019-07-17T21:01:24Z")

</div>

Hello,

I'm trying to use json\_batch in http output, how I can set the buffer size and time to flush?

My sample pipeline:

logstash -e 'input{stdin {}} filter{ mutate { add\_field =\> { "level" =\> "info" "mrId" =\> "mrTest" "creationDate" =\> 0}}} output {http {format =\> "json\_batch" http\_method =\> "post" headers =\> ["api-key", "YWRtaW46cGFzc3dvcmQxMjM"] url =\> "[http://0.0.0.0:8082/v1/ns/example.ns/logs](http://0.0.0.0:8082/v1/ns/example.ns/logs)"}}'

Thanks in advanced.

---

<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:** [July 17, 2019, 9:48pm UTC](https://discuss.elastic.co/t/json-batch-i-need-set-the-buffer-size-and-flush-time/191090/2 "2019-07-17T21:48:30Z")

</div>

I am not certain, but if I understand output plugins correctly the http output will post the whole of a pipeline batch together in a single post. So you would control this with the standard pipeline.batch.delay and pipeline.batch.size options.

---

<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:** [August 14, 2019, 9:48pm UTC](https://discuss.elastic.co/t/json-batch-i-need-set-the-buffer-size-and-flush-time/191090/3 "2019-08-14T21:48:33Z")

</div>

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