I suspect you won't be able to use the json or json_lines codecs since it's an array, but you can use a json filter to deserialize the JSON string. Then use a mutate filter to rename (move) the fields into the top level of the event.
thanks magnus, but i want a way to transform this log by with out using the names of each json value, there is a way to do that?, the reason is that i have to many differents json formats in my logs, for example
one:
[{"id":"917066d5-5244-42e1-9343-49ccefe5b8cb","name":"data1","dataamount":1024000,"notification":0}]
two:
[{"id":"917066d5-5244-42e1-9343-49ccefe5b8cb","name":"data1","dataamount":1024000,"notification":0}"field3":120012,"field4":wwa]
three:
[{"id":"917066d5-5244-42e1-9343-49ccefe5b8cb","name":"data1","dataamount":1024000,"notification":0}"field3":120012,"field4":wwa,"field5":45454]
And many other variations, is posible to use a general filter that apply to all this logs? Or I have to use a differente filter to each one.
thanks
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.