【发布时间】:2020-01-14 15:40:19
【问题描述】:
我正在使用 FluentD(部署为 DaemonSet)将 k8s 应用程序(容器)日志流式传输到 elasticsearch。 我想从弹性的'log'键字符串中提取特定键,例如logKey:...或statusCode:..(在下面的'log'键内)
Please see the log i'm trying to parse:
我看到我应该使用 FluentD 插件在将日志发送到弹性之前对其进行解析, 但不幸的是我没有找到办法。
这是我当前的 ConfigMap 容器部分:
<source>
@type tail
path /var/log/containers/*.log
pos_file /var/log/app.log.pos
tag kubernetes.*
read_from_head true
<parse>
@type json
time_format %Y-%m-%dT%H:%M:%S.%NZ
</parse>
</source>
非常感谢您的帮助。
【问题讨论】:
标签: elasticsearch kubernetes fluentd