【问题标题】:How to convert Nginx error.log to json format如何将 Nginx error.log 转换为 json 格式
【发布时间】:2020-12-16 02:33:41
【问题描述】:

有没有办法将 Nginx 中的 error.log 转换为 json?我需要将日志发送到外部日志查看器,为此我需要将 error.log 转换为 json。

【问题讨论】:

标签: json nginx error-log nginx-log


【解决方案1】:

使用 filebeat 可能是一种替代方法,具体取决于您是否要发送日志(请参阅 https://www.elastic.co/guide/en/beats/filebeat/current/configuring-output.html

【讨论】:

  • 你是对的,对不起!你想发送你的错误日志吗?
  • 我将它们运送到 GCP。但我需要创建一种内部格式,因此将其转换为 json 对我来说很容易。
  • 听起来像是 filebeat / logstash 设置的正确用例(filebeat 在 nginx 主机上运行并将您的日志发送到 logstash 实例/集群,该实例/集群使用可用输出之一转换并发送到 GCP插件)
猜你喜欢
  • 2020-08-30
  • 2019-11-12
  • 2021-10-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-08-09
  • 2015-03-26
  • 2011-07-04
相关资源
最近更新 更多