Skip to content

Commit fe18c0c

Browse files
author
Carlos Pérez-Aradros Herce
authored
Report host metadata for Kubernetes logs (#12790)
* Report host metadata for Kubernetes logs Filebeat was not reporting host metadata in the default Kubernetes manifest, this change gives Filebeat access to the hostNetwork to retrieve localhost metadata. `add_host_metadata` is added to gather it.
1 parent e76abe1 commit fe18c0c

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

CHANGELOG.next.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
236236
- Add `google-pubsub` input type for consuming messages from a Google Cloud Pub/Sub topic subscription. {pull}12746[12746]
237237
- Add module for ingesting Cisco IOS logs over syslog. {pull}12748[12748]
238238
- Add module for ingesting Google Cloud VPC flow logs. {pull}12747[12747]
239+
- Report host metadata for Filebeat logs in Kubernetes. {pull}12790[12790]
239240
- Add netflow dashboards based on Logstash netflow. {pull}12857[12857]
240241
- Parse more fields from Elasticsearch slowlogs. {pull}11939[11939]
241242

deploy/kubernetes/filebeat-kubernetes.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ data:
3333
3434
processors:
3535
- add_cloud_metadata:
36+
- add_host_metadata:
3637
3738
cloud.id: ${ELASTIC_CLOUD_ID}
3839
cloud.auth: ${ELASTIC_CLOUD_AUTH}
@@ -57,6 +58,8 @@ spec:
5758
spec:
5859
serviceAccountName: filebeat
5960
terminationGracePeriodSeconds: 30
61+
hostNetwork: true
62+
dnsPolicy: ClusterFirstWithHostNet
6063
containers:
6164
- name: filebeat
6265
image: docker.elastic.co/beats/filebeat:8.0.0

deploy/kubernetes/filebeat/filebeat-configmap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ data:
3333
3434
processors:
3535
- add_cloud_metadata:
36+
- add_host_metadata:
3637
3738
cloud.id: ${ELASTIC_CLOUD_ID}
3839
cloud.auth: ${ELASTIC_CLOUD_AUTH}

deploy/kubernetes/filebeat/filebeat-daemonset.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ spec:
1313
spec:
1414
serviceAccountName: filebeat
1515
terminationGracePeriodSeconds: 30
16+
hostNetwork: true
17+
dnsPolicy: ClusterFirstWithHostNet
1618
containers:
1719
- name: filebeat
1820
image: docker.elastic.co/beats/filebeat:%VERSION%

0 commit comments

Comments
 (0)