我是靠谱客的博主 冷酷小伙,这篇文章主要介绍k8s笔记日志--容器中添加filebeat收集器,现在分享给大家,希望可以做个参考。

apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
data:
filebeat.yml: |-
filebeat.prospectors:
- input_type: log
paths:
- "/data/log/eventrouter/*"
fields:
app: www
type: eventrouter-log
fields_under_root: true
multiline:
pattern: '^['
negate: true
match: after
output.logstash:
hosts: ["10.0.3.104:5044"]

修改要领:

  • 修改namespace保持一致
  • 明确该应用的日志的目录,即 paths:路径
  • 设定fields:中的 type类型,logstash-to-es.conf中需要使用该type名称。
  • 配置logstash的地址 output.logstash:

最后

以上就是冷酷小伙最近收集整理的关于k8s笔记日志--容器中添加filebeat收集器的全部内容,更多相关k8s笔记日志--容器中添加filebeat收集器内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(63)

评论列表共有 0 条评论

立即
投稿
返回
顶部