How to parse eve.json output file from logstash using laravel

175 views Asked by At

I want to parse the eve.json output file of logstash using Laravel. I have tried the JsonMachine package, but I'm getting Unexpected symbol '{' At position 0.

Here is a sample output of the eve.json:

{"timestamp":2022-04-24T03"}
{"timestamp":2022-04-24T03"}
{"timestamp":2022-04-24T03"}

As you can see, this is an invalid json format. That's why the JsonMachine is parsing only the first valid json line, which is the first line. I wanted to parse the whole eve.json file so I can display them on a table using Laravel.

Thank you!

0

There are 0 answers