logstash-input-http icon indicating copy to clipboard operation
logstash-input-http copied to clipboard

Support for json_batch codec as supported by HTTP-Output

Open gaby opened this issue 5 years ago • 4 comments

Currently only the http-output plugin supports json_batch. It would make sense that http-input would do so too.

I'm currently sending a file with hundreds of jsons in it with no EOL, and logstash ignores the whole batch with 0 errors.

gaby avatar May 13 '19 23:05 gaby

Is there any plans of rolling out way to handle a batch of json for http_input plugin any time soon?

buch11 avatar Jan 20 '20 02:01 buch11

I ended up using "json_lines" codec as my batch of jsons were /n delimited.

buch11 avatar Jan 30 '20 01:01 buch11

Did anybody ever figure out a solution for this? I am trying json_lines as my codec and POST'ed a file with two JSON structs, \n delimited, and only the first one goes through:

{
 "event": {
   "test": "one"
  }
}
{
 "event": {
   "test": "two"
  }
}

chrissnell-okta avatar Mar 15 '21 16:03 chrissnell-okta

@chrissnell-okta You need \n at the end of each structure, even the last one.

gaby avatar Mar 16 '21 13:03 gaby