美文网首页
filebeat 收集 skywalking 日志(k8s)

filebeat 收集 skywalking 日志(k8s)

作者: 王伟杰 | 来源:发表于2020-04-16 17:57 被阅读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']

相关文章

网友评论

      本文标题:filebeat 收集 skywalking 日志(k8s)

      本文链接:https://www.haomeiwen.com/subject/dtqdvhtx.html