filebeat采集日志时如何排除不想看到的日志

229次阅读
没有评论

共计 162 个字符,预计需要花费 1 分钟才能阅读完成。

闲话少说,直接上配置示例吧:

1、带正则表达式的,比如排除某个 DEBUG 开头的日志

processors:
  - drop_event:
      when:
        regexp:
          message: "^DEBUG:"

2、排除还有某个关键字如 test 的日志

processors:
  - drop_event:
      when:
        contains:
          message: "test"
正文完
 
sharp097
版权声明:本站原创文章,由 sharp097 2020-12-18发表,共计162字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)