Json_v2 TCP socket_listener

I have a data source sending a stream of json objects over TCP. Should mention that they are separated by carriage return (one json object per line).

i was trying to use a TCP socket_listener with json_v2 to parse the objects, but it seems that they are not getting processed (I don’t see errors either).

if I do the same stream in a file, I get errors from the file listener if I have more than one json object in the file.

Is this possible with socket_listener TCP and json_v2?

Can you provide your telegraf config of the socket input plugin and some sample data?

Is this problem solved yet?
actually I’ve got a similar problem getting json data from a cisco device via TCP into telegraf.
When I use the file input w the same JSON content from a file, the json_v2 parsing works …
If I go for socket_listener tcp or tcp_listener togehter w data_format= json_v2 I get nothing, not even errors.

from the pcap capture I can see that telegraf has a constant tcp session with the Cisco device which streams one JSON object after another. Could it be that the json_v2 parser is unable to parse the stream and can’t separate the sequentially arriving JSON objects? … does it wait for the TCP session to terminate?

When using inputs.socket_listener you can specify splitting_strategy = "newline" and setup the JSON parser correctly…

thx @srebhan for pointing me to the splitting_strategy.
to complete the thread, the subject was Cisco IOX XR model driven telemetry.
Unfortunately the cisco mdt plugin didn’t properly processed lists of satellites and I had to use JSON as encoding.
I figured that the Cisco Telemetry JSON stream has a 12 Byte header which I had to adapt the splitting_strategy like that:

splitting_strategy: "variable length" splitting_length_field: {offset = 10, bytes = 2, endianness = "be", header_length = 12}