Supported OS Linux Windows Mac OS

Versión de la integración7.0.0
This page is not yet available in Spanish. We are working on its translation.
If you have any questions or feedback about our current translation project, feel free to reach out to us!

Overview

Get metrics from kube-dns service in real time to:

  • Visualize and monitor DNS metrics collected with the Kubernetes’ kube-dns addon through Prometheus

See https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns for more information about kube-dns.

Setup

Installation

The kube-dns check is included in the Datadog Agent package, so you don’t need to install anything else on your servers.

Configuration

Edit the kube_dns.d/conf.yaml file, in the conf.d/ folder at the root of your Agent’s configuration directory. See the sample kube_dns.d/conf.yaml for all available configuration options.

Using with service discovery

If you are using one Agent pod per Kubernetes worker node, use the following annotations on your kube-dns pod to retrieve the data automatically.

apiVersion: v1
kind: Pod
metadata:
  annotations:
    service-discovery.datadoghq.com/kubedns.check_names: '["kube_dns"]'
    service-discovery.datadoghq.com/kubedns.init_configs: '[{}]'
    service-discovery.datadoghq.com/kubedns.instances: '[[{"prometheus_endpoint":"http://%%host%%:10055/metrics", "tags":["dns-pod:%%host%%"]}]]'

Remarks:

  • The “dns-pod” tag tracks the target DNS pod IP. The other tags are related to the dd-agent that is polling the information using the service discovery.
  • The service discovery annotations need to be done on the pod. In case of a deployment, add the annotations to the metadata of the template’s spec.

Validation

Run the Agent’s status subcommand and look for kube_dns under the Checks section.

Data Collected

Metrics

kubedns.cachemiss_count
(gauge)
Number of DNS requests resulting in a cache miss.
Shown as request
kubedns.cachemiss_count.count
(count)
Instant number of DNS requests made resulting in a cache miss.
Shown as request
kubedns.error_count
(gauge)
Number of DNS requests resulting in an error.
Shown as error
kubedns.error_count.count
(count)
Instant number of DNS requests made resulting in an error.
Shown as error
kubedns.request_count
(gauge)
Total number of DNS requests made.
Shown as request
kubedns.request_count.count
(count)
Instant number of DNS requests made.
Shown as request
kubedns.request_duration.seconds.count
(gauge)
Number of requests on which the kubedns.request_duration.seconds.sum metric is evaluated.
Shown as request
kubedns.request_duration.seconds.sum
(gauge)
Time (in seconds) each request took to resolve.
Shown as second
kubedns.response_size.bytes.count
(gauge)
Number of responses on which the kubedns.response_size.bytes.sum metric is evaluated.
Shown as response
kubedns.response_size.bytes.sum
(gauge)
Size of the returns response in bytes.
Shown as byte

Events

The kube-dns check does not include any events.

Service Checks

kubedns.up

Returns CRITICAL if Kube DNS is not healthy.

Statuses: ok, critical

Troubleshooting

Need help? Contact Datadog support.