////
This file is generated! See scripts/mage/docs_collector.go
////

:modulename: coredns

[[metricbeat-module-coredns]]
[role="xpack"]
== Coredns module

This is the CoreDNS module. The CoreDNS module collects metrics from the
CoreDNS https://github.com/coredns/coredns/tree/master/plugin/metrics[prometheus exporter endpoint].

The default metricset is `stats`.

[float]
=== Compatibility

The CoreDNS module is tested with CoreDNS 1.5.0


[float]
=== Dashboard

The CoreDNS module comes with a predefined dashboard. For example:

image::./images/metricbeat_coredns_dashboard.png[]


[float]
=== Example configuration

The Coredns module supports the standard configuration options that are described
in <<configuration-metricbeat>>. Here is an example configuration:

[source,yaml]
----
metricbeat.modules:
- module: coredns
  metricsets: ["stats"]
  period: 10s
  hosts: ["localhost:9153"]
----

[float]
=== Metricsets

The following metricsets are available:

* <<metricbeat-metricset-coredns-stats,stats>>

include::coredns/stats.asciidoc[]

