Filter message log in logstash

i want to add filter to logstash to convert message to json format
this is my example

API response < HTTP 200 - body: {"result": [{"status": {"code": -18, "message": "No permission for the resource"}, "url": "/os/hi"}]}

thank you

If you want to convert that to JSON then you could use

mutate { gsub => [ "message", ".*body:", "" ] }

If you want to parse the resulting JSON then you could use a json filter.

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