Logstash “添加或覆盖”的正确方式是什么;“类型”;在filebeat.yml中?

Logstash “添加或覆盖”的正确方式是什么;“类型”;在filebeat.yml中?,logstash,elastic-stack,logstash-configuration,filebeat,elk,Logstash,Elastic Stack,Logstash Configuration,Filebeat,Elk,我正在用filbeat把jenkins的原木藏在麋鹿堆里。我需要在filbeat.yml中添加或重写“type” 请在这里找到logstash.conf 我需要在filebeat.yml中添加或覆盖“type”(在图片中以红色突出显示) 请在此处找到filebeat.yml: filebeat.inputs: - type: log enabled: true paths: - /opt/app/elk/logs/jenkins.log multiline.pattern:

我正在用filbeat把jenkins的原木藏在麋鹿堆里。我需要在filbeat.yml中添加或重写“type”

请在这里找到logstash.conf

我需要在filebeat.yml中添加或覆盖“type”(在图片中以红色突出显示)

请在此处找到filebeat.yml:

filebeat.inputs:
- type: log
  enabled: true
  paths:
   - /opt/app/elk/logs/jenkins.log 
  multiline.pattern: '^%{MONTH} %{MONTHDAY}, %{YEAR} %{TIME} (AM|PM)'
  multiline.negate: true
  multiline.match: before

要使用filebeat添加字段,请使用以下命令:


_root:true下的
字段将在文档的顶层添加
类型
,如果将其设置为false,它将添加到
字段
对象中,因此您有一个名为
字段的字段。类型

你好,谢谢您的快速响应。我会尝试解决办法,如果我不能做到这一点,我会在这里联系你。
- type: log 
  paths:
    - /path/to/your/files/*.log
  fields:
    type: your-type
  fields_under_root: true