[英]filebeat hint based autodiscovery feature seems not to be working
我已经实现了基于 filebeat 提示的自动发现功能,但它似乎不起作用。 以下是配置详细信息:
注意 - 我在使用 containerd 作为其容器引擎的 k8s 集群中运行 filebeat。
K8s 和 Filebeat 版本
k8s version: 1.21.3
filebeat: 7.12.0
以下是在日志生产者 k8 配置文件中添加的注释
annotations:
co.elastic.logs/multiline.pattern: '^\['
co.elastic.logs/multiline.negate: 'true'
co.elastic.logs/multiline.match: 'after'
日志生产者传递的示例日志消息(示例)
[ Exception in ] thread main java.lang.NumberFormatException: For input string: 3.1415
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
[ Exception in ] thread main java.lang.NumberFormatException: For input string: 3.1415
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
文件节拍配置:
filebeat.yml: |
filebeat.autodiscover:
providers:
- type: kubernetes
namespace: "test-ns"
hints.enabled: true
templates:
- config:
- paths:
- /var/log/pods/${data.kubernetes.namespace}_${data.kubernetes.pod.name}_${data.kubernetes.pod.uid}/${data.kubernetes.container.name}/*.log
type: container
Output - 多行模式似乎不起作用,它将其视为单独的日志事件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.