---
title: Coredns module
description: This is the CoreDNS module. The CoreDNS module collects metrics from the CoreDNS prometheus exporter endpoint. The default metricset is stats. The CoreDNS...
url: https://www.elastic.co/docs/reference/beats/metricbeat/metricbeat-module-coredns
products:
  - Beats
  - Metricbeat
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# Coredns module
This is the CoreDNS module. The CoreDNS module collects metrics from the CoreDNS [prometheus exporter endpoint](https://github.com/coredns/coredns/tree/master/plugin/metrics).
The default metricset is `stats`.

## Compatibility

The CoreDNS module is tested with CoreDNS 1.5.0

## Dashboard

The CoreDNS module comes with a predefined dashboard. For example:
![metricbeat coredns dashboard](https://www.elastic.co/docs/reference/beats/metricbeat/images/metricbeat_coredns_dashboard.png)

## Example configuration

The Coredns module supports the standard configuration options that are described in [Modules](https://www.elastic.co/docs/reference/beats/metricbeat/configuration-metricbeat). Here is an example configuration:
```yaml
metricbeat.modules:
- module: coredns
  metricsets: ["stats"]
  period: 10s
  hosts: ["localhost:9153"]
```


## Metricsets

The following metricsets are available:
- [stats](https://www.elastic.co/docs/reference/beats/metricbeat/metricbeat-metricset-coredns-stats)