0

我从 logstash 中的 filebeats 接收数据,但没有看到 [log][file][path] 的值。我看到其他人在 logstash 数据中获取数据,以下是我收到的数据。日志路径中没有来自 beat 的数据。预先感谢您的帮助。

{
    "_index" : "%{merchant_id}",
    "_type" : "_doc",
    "_id" : "gpPkankB77M3Al5AC9Cs",
    "_score" : 1.0,
    "_source" : {
      "host" : {
        "name" : "53f955bf4e04"
      },
      "message" : "request: \nnull",
      "@version" : "1",
      "@timestamp" : "2021-05-08T09:50:26.090Z",
      "level" : "D",
      "stacktrace" : true,
      "ls_pipe" : "droid_log",
      "agent" : {
        "id" : "dffd6c5f-69e9-416c-b08c-f2229e6d477b",
        "name" : "53f955bf4e04",
        "version" : "7.12.1",
        "type" : "filebeat",
        "ephemeral_id" : "6417dd44-79fd-44a9-8798-5ae188f9fe62",
        "hostname" : "53f955bf4e04"
      },
      "device" : {
        "id" : "1850006639",
        "tid" : "3786",
        "pid" : "3732"
      },
      "tags" : [
        "beats_input_codec_plain_applied",
        "_grokparsefailure"
      ],
      "input" : {
        "type" : "log"
      },
      "ecs" : {
        "version" : "1.8.0"
      },
      "logger" : "postiliondriver.parameters.PostilionParamDownloadBase"
    }
  }

Logstash 配置

节拍

4

1 回答 1

0

您的drop_fields处理器中有一个filebeat.yml正在丢弃该log字段的处理器。

如果您删除该字段,则无法在 logstash 中使用它,因为它在您的消息中不存在。

从处理器中删除log字段drop_fields并重试。

于 2021-05-14T15:38:55.327 回答