Trying to use json codec on stdin - switching to json_lines?

My interpretation of https://www.elastic.co/guide/en/logstash/6.6/plugins-codecs-json.html is that if I have input { stdin { codec => json } } I should be able to pipe in e.g.

[
    {"event": 1},
    {"event": 2}
 ]

And get two events processed into the pipeline. However, I'm always getting [INFO ][logstash.inputs.stdin ] Automatically switching from json to json_lines codec {:plugin=>"stdin"}

Is my interpretation of the documentation incorrect? Is it a problem with it being multiline? (I actually compress the JSON into one line with jq -cM . input.json before pipeing it into logstash)

Thanks, Dan.

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