docker-filebeat/filebeat-kubernetes.yml

57 lines
1.5 KiB
YAML

#filebeat.config:
# modules:
# path: ${path.config}/modules.d/*.yml
# reload.enabled: false
filebeat.autodiscover:
providers:
- type: kubernetes
node: '${NODE_NAME}'
hints.enabled: true
#templates:
# - config:
# - type: container
# paths:
# - /var/log/containers/*-${data.kubernetes.container.id}.log
# kubernetes pod annotation example
# annotations:
# co.elastic.logs.json-logging/json.keys_under_root: "true"
# co.elastic.logs.json-logging/json.add_error_key: "true"
# co.elastic.logs.json-logging/json.message_key: "message"
hints.default_config:
type: container
paths:
- /var/log/containers/*-${data.kubernetes.container.id}.log
processors:
- add_cloud_metadata: ~
- add_locale:
format: offset
- add_kubernetes_metadata:
- add_host_metadata: ~
setup:
kibana:
host: '${KIBANA_HOSTS:kibana:5601}'
ssl:
verification_mode: none
template:
enabled: true
name: "filebeat-%{[agent.version]}"
pattern: "index-%{[beat.version]}-*"
dashboards:
enabled: false
#index: "filebeat-%{[agent.version]}-*"
output.elasticsearch:
hosts: '[${ELASTICSEARCH_HOSTS:elasticsearch:9200}]'
username: '${ELASTICSEARCH_USERNAME:}'
password: '${ELASTICSEARCH_PASSWORD:}'
ssl:
verification_mode: none
indices:
- index: "filebeat-%{[agent.version]}-%{[kubernetes.container.name]:common}-%{+yyyy.MM.dd}"
#logging.json: true
#logging.metrics.enabled: false