【问题标题】:filebeat add_fields processor with condition带有条件的 filebeat add_fields 处理器
【发布时间】:2019-04-26 15:39:27
【问题描述】:

我想在 Filebeat“apache”模块导出到 Graylog 的每一行中添加一个值为“apache-access”的字段“app”。

当我在 Graylog 中看到“event_dataset”="apache.access" 字段时,以下配置应添加该字段,但不执行任何操作。 如果我删除条件,“add_fields”处理器确实会添加一个字段。

filebeat.inputs:
- type: log
  enabled: false
  paths:
    - /var/log/*.log
filebeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false
setup.template.settings:
  index.number_of_shards: 1
setup.kibana:
output.logstash:
  hosts: [ "localhost:5044" ]

processors:
- add_fields:
    when:
      equals:
        event_dataset: "apache.access"
    target: ""
    fields:
      app: "apache-access"

logging.level: info

【问题讨论】:

    标签: filebeat


    【解决方案1】:

    无论出于何种原因,该字段在 filebeat 中称为“event.dataset”,但在 Graylog 中显示为“event_dataset”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-05-21
      • 2022-11-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-09-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多