Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing Kubernetes metadata fields to Filebeat CoreDNS module, and fix a documentation error - issue #11590. #11591

Merged
merged 8 commits into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Improve detection of file deletion on Windows. {pull}10747[10747]
- Fix goroutine leak happening when harvesters are dynamically stopped. {pull}11263[11263]
- Fix `add_docker_metadata` source matching, using `log.file.path` field now. {pull}11577[11577]
- Address issue: Filebeat coredns module has wrong information in docs.asciidoc and some kubernetes meta fields are missing. {pull}11591[11591]
alakahakai marked this conversation as resolved.
Show resolved Hide resolved

*Heartbeat*

Expand Down
3 changes: 1 addition & 2 deletions filebeat/docs/modules/coredns.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ This file is generated! See scripts/docs_collector.py
== Coredns Module

This is a filebeat module for coredns. It supports both standalone coredns deployment and
coredns deployment in Kubernetes. Standalone coredns deployment uses the log fileset, while
Kubernetes coredns deployment uses the kubernetes fileset.
coredns deployment in Kubernetes.

[float]
=== Compatibility
Expand Down
3 changes: 1 addition & 2 deletions x-pack/filebeat/module/coredns/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
== Coredns Module

This is a filebeat module for coredns. It supports both standalone coredns deployment and
coredns deployment in Kubernetes. Standalone coredns deployment uses the log fileset, while
Kubernetes coredns deployment uses the kubernetes fileset.
coredns deployment in Kubernetes.

[float]
=== Compatibility
Expand Down
7 changes: 7 additions & 0 deletions x-pack/filebeat/module/coredns/log/ingest/pipeline-json.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
"ignore_failure" : true
}
},
{
"rename": {
"field": "json.kubernetes",
"target_field": "kubernetes",
"ignore_failure" : true
}
},
{
"remove": {
"field": ["json", "bufsize"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
"event.module": "coredns",
"fileset.name": "log",
"input.type": "log",
"kubernetes.container.name": "coredns",
"kubernetes.labels.k8s-app": "kube-dns",
"kubernetes.labels.pod-template-hash": "86c58d9df4",
"kubernetes.namespace": "kube-system",
"kubernetes.node.name": "minikube",
"kubernetes.pod.name": "coredns-86c58d9df4-jwhsg",
"kubernetes.pod.uid": "d57d545e-2a9d-11e9-995f-08002730e0dc",
"kubernetes.replicaset.name": "coredns-86c58d9df4",
"log.level": "INFO",
"log.offset": 0,
"message": "2019-02-12T00:27:28.903Z [INFO] 172.17.0.4:36413 - 21583 \"A IN httpbin.org.cluster.local. udp 43 false 512\" NXDOMAIN qr,rd,ra 136 0.000102078s",
Expand Down Expand Up @@ -53,6 +61,14 @@
"event.module": "coredns",
"fileset.name": "log",
"input.type": "log",
"kubernetes.container.name": "coredns",
"kubernetes.labels.k8s-app": "kube-dns",
"kubernetes.labels.pod-template-hash": "86c58d9df4",
"kubernetes.namespace": "kube-system",
"kubernetes.node.name": "minikube",
"kubernetes.pod.name": "coredns-86c58d9df4-jwhsg",
"kubernetes.pod.uid": "d57d545e-2a9d-11e9-995f-08002730e0dc",
"kubernetes.replicaset.name": "coredns-86c58d9df4",
"log.level": "INFO",
"log.offset": 550,
"message": "2019-03-19T02:57:23.213Z [INFO] 172.17.0.9:37723 - 6966 \"A IN httpbin.org. udp 29 false 512\" NOERROR qr,rd,ra 83 0.000082083s\n",
Expand Down Expand Up @@ -86,6 +102,14 @@
"event.module": "coredns",
"fileset.name": "log",
"input.type": "log",
"kubernetes.container.name": "coredns",
"kubernetes.labels.k8s-app": "kube-dns",
"kubernetes.labels.pod-template-hash": "86c58d9df4",
"kubernetes.namespace": "kube-system",
"kubernetes.node.name": "minikube",
"kubernetes.pod.name": "coredns-86c58d9df4-jwhsg",
"kubernetes.pod.uid": "d57d545e-2a9d-11e9-995f-08002730e0dc",
"kubernetes.replicaset.name": "coredns-86c58d9df4",
"log.level": "INFO",
"log.offset": 1081,
"message": "2019-03-11T07:16:34.013Z [INFO] [::1]:37915 - 62762 \"AAAA IN czbaoyu.com. udp 29 false 512\" NOERROR qr,rd,ra 100 0.00006286s\n",
Expand Down