Is there a way to convert the error.log in Nginx to json? I need to ship the logs to an external log viewer, to do that I need to convert the error.log to json.
Asked
Active
Viewed 1,177 times
1 Answers
0
Using filebeat may be an alternative depending on were you want to ship your logs (see https://www.elastic.co/guide/en/beats/filebeat/current/configuring-output.html)

36ve
- 513
- 4
- 12
-
-
I'm shipping them to GCP. But I need to create an internal format so converting it to json will make it easy for me. – Sine C Aug 27 '20 at 10:55
-
Sounds like a proper use case for a filebeat / logstash setup (with filebeat running on the nginx host and sending your logs to a logstash instance/cluster that transforms and ships to GCP using one of the available output plugins) – 36ve Aug 27 '20 at 13:26