filebeat-configmap.yaml
911 Bytes
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: logging
labels:
app: filebeat
data:
filebeat.yml: |
filebeat.inputs:
- type: container
paths:
- /var/log/containers/*.log
processors:
- add_kubernetes_metadata:
host: ${NODE_NAME}
matchers:
- logs_path:
logs_path: "/var/log/containers/"
setup.template.settings:
index.number_of_shards: 1
index.codec: best_compression
setup.kibana:
host: "kibana-service:5601"
output.elasticsearch:
hosts: ['elasticsearch-service:9200']
indices:
- index: "filebeat-%{[agent.version]}-%{+yyyy.MM.dd}"
when.equals:
kubernetes.namespace: "default"
- index: "filebeat-%{[agent.version]}-kube-system-%{+yyyy.MM.dd}"
when.equals:
kubernetes.namespace: "kube-system"