filebeat 收集 skywalking 日志(k8s)
2020-04-16 本文已影响0人
王伟杰
# 配置 filebeat 自动发现
filebeat.autodiscover:
providers:
- type: kubernetes
node: ${NODE_NAME}
hints.enabled: true
hints.default_config:
type: container
paths:
- /var/log/containers/*${data.kubernetes.container.id}.log
templates:
- condition.and:
- equals:
kubernetes.namespace: infra
- contains:
kubernetes.labels.app: skywalking
config:
- type: docker
containers.ids:
- "${data.kubernetes.container.id}"
multiline:
pattern: "^endpoints|^20"
negate: true
match: after
processors:
- add_cloud_metadata:
- add_host_metadata:
output.elasticsearch:
hosts: ['logging-es-master:9200']