Beats : Error decoding JSON: json: cannot unmarshal array

(Sahas) #1

I'm trying out the latest beta (filebeat-5.0.0-alpha3-darwin-x64). Its working as expected for simple .json object. However, getting below error when I try to ship an array [{"name":"first","count":100},{"name":"second","count":200}]

"json": {
"json_error": "Error decoding JSON: json: cannot unmarshal array into Go value of type common.MapStr",

Is it supported yet?

(ruflin) #2

@sahas It is currently not supported but as far as I know it is not documented anywhere. Can you share some more details on what kind of system creates these logs?

@tudor Any thoughts on this one?

(Sahas) #3

@ruflin, its my private system that generates logs like this. I could easily go back and change code to generate object per line but wanted to know if we could use filebeat as is.

Thanks !

(Steffen Siering) #4

I think it's object per line on purpose. as each object will be reported as event (merged into event-object when parsed).

(system) #5

This topic was automatically closed after 21 days. New replies are no longer allowed.