Skip to content

Commit 504911a

Browse files
committed
Fixes kubernetes metadata inclusion
thanks to https://discuss.elastic.co/t/kubernetes-metadata/90865/15
1 parent 52c28e8 commit 504911a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

logs-streaming/filebeat-config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ data:
1010
- type: log
1111
enabled: true
1212
paths:
13-
- /var/log/containers/*.log
14-
# Logs say a lot of https://github.com/elastic/beats/blob/v6.0.0-rc2/filebeat/prospector/log/prospector.go#L250
13+
- /var/lib/docker/containers/*/*.log
1514
symlinks: true
1615
# reduce the risk for aggregation recursion: match pod names to exclude own's logs + test logs
1716
exclude_files: ['^(.*\/)?logs-','^(.*\/)?test-']
1817
1918
processors:
2019
- add_kubernetes_metadata:
2120
in_cluster: true
21+
namespace: logs-kafka
2222
2323
output.kafka:
2424
hosts: ["kafka-0.broker.kafka.svc.cluster.local:9092", "kafka-1.broker.kafka.svc.cluster.local:9092", "kafka-2.broker.kafka.svc.cluster.local:9092"]

logs-streaming/filebeat-logs-kube-kafka.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
- -c
2727
- /etc/filebeat/filebeat.yml
2828
- -d
29-
- "service,beat"
29+
- "service,beat,kubernetes"
3030
env:
3131
- name: TOPIC
3232
value: ops-kube-logs-filebeat-001

0 commit comments

Comments
 (0)