Using NDJSON for Logstash HTTP Output Plugin

I'm looking to use a Logstash http output plugin to send a batch of JSON events where all the events are stored in the HTTP message as new-line delimited JSON events. For example, we'd need the data of the HTTP transmission to show up at the listener as:
{json_event1}\n{json_event2}\n....{json_eventN}\n

Unfortunately, the format => json_batch option defaults to sending an array of JSON events with outer brackets and comma delimiters, i.e. the data of the HTTP transmission looks like:
[ {json_event1}, {json_event2}, ..., {json_eventN} ]

My initial solution was to output the batch of events to a file in NDJSON, then use a file input plugin to read in that entire NDJSON as a string in the message field, then send that message field using the http output plugin. However, then you end up with an extra literal slash in front of all special characters and quotations due to all the json events being interpreted as one giant string.

Is there any way to change the behavior of format => json_batch in the http output plugin from sending an array of JSON events to sending newline-delimited JSON events? Thanks in advance!

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