Skip to content

Instantly share code, notes, and snippets.

@kesor
Last active September 2, 2020 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kesor/44c7802bd796281edc484cb9e5d7d241 to your computer and use it in GitHub Desktop.
Save kesor/44c7802bd796281edc484cb9e5d7d241 to your computer and use it in GitHub Desktop.
filebeat.autodiscover:
providers:
# documented at https://www.elastic.co/guide/en/beats/filebeat/master/configuration-autodiscover.html
- type: kubernetes
host: ${NODE_NAME}
hints.enabled: true
hints.default_config:
type: container
paths:
- /var/log/containers/*${data.kubernetes.container.id}.log
templates:
- config:
# documented at https://www.elastic.co/guide/en/beats/filebeat/master/filebeat-input-container.html
- type: container
paths:
- /var/lib/docker/containers/${data.kubernetes.container.id}/*.log
processors:
- add_kubernetes_metadata:
host: ${NODE_NAME}
- add_docker_metadata:
- add_host_metadata:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment