Skip to content

Commit

Permalink
Add missing Kubernetes metadata fields to Filebeat CoreDNS module, an…
Browse files Browse the repository at this point in the history
…d fix a documentation error - issue #11590. (#11591)

* Add missing Kubernetes metadata fields to Filebeat CoreDNS module, and fix a documentation error.
  • Loading branch information
Ray Qiu authored Apr 3, 2019
1 parent 0caa944 commit dfc7850
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 4 deletions.
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]
- Add missing Kubernetes metadata fields to Filebeat CoreDNS module, and fix a documentation error. {pull}11591[11591]

*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

0 comments on commit dfc7850

Please sign in to comment.