CoreDNS Metrics API

Prometheus-compatible metrics endpoints exposing DNS query statistics, cache performance, latency histograms, and build information.

Operations 1

GET /metrics CoreDNS Get Prometheus metrics #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/coredns-metrics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

coredns-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CoreDNS Health Metrics API
  description: The CoreDNS health plugin exposes an HTTP health check endpoint at /health on port 8080 by default. It reports the overall health of the CoreDNS process and is used by Kubernetes liveness and readiness probes to determine if the DNS server is operational. When lameduck mode is enabled, the health endpoint returns HTTP 503 for a configurable duration before shutdown to allow graceful traffic draining.
  version: 2.x
  contact:
    name: CoreDNS Community
    url: https://coredns.io/community/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:8080
  description: CoreDNS Health HTTP server (default port, configurable)
tags:
- name: Metrics
  description: Prometheus-compatible metrics endpoints exposing DNS query statistics, cache performance, latency histograms, and build information.
paths:
  /metrics:
    get:
      operationId: getMetrics
      summary: CoreDNS Get Prometheus metrics
      description: Returns all CoreDNS metrics in Prometheus text exposition format (version 0.0.4). The response includes counters, gauges, histograms, and summaries covering DNS request rates by server and zone, response code distributions, DNS query type breakdowns, cache hit rates, panics, and plugin-specific metrics such as forward latency and health check state. Requires the prometheus plugin to be configured in the Corefile.
      tags:
      - Metrics
      responses:
        '200':
          description: Prometheus text format metrics.
          content:
            text/plain:
              schema:
                type: string
                description: Prometheus exposition format text, one metric per line with HELP and TYPE comments followed by sample lines. Key metrics include coredns_dns_requests_total, coredns_dns_responses_total, coredns_dns_request_duration_seconds, coredns_cache_hits_total, coredns_cache_misses_total, coredns_forward_requests_total, and coredns_build_info.
              example: '# HELP coredns_build_info A metric with a constant ''1'' value labeled by version, revision, and goversion from which CoreDNS was built.

                # TYPE coredns_build_info gauge

                coredns_build_info{goversion="go1.21.0",revision="abcdef",version="1.11.1"} 1

                # HELP coredns_dns_requests_total Counter of DNS requests made per zone, protocol and family.

                # TYPE coredns_dns_requests_total counter

                coredns_dns_requests_total{family="1",proto="udp",server="dns://:53",type="A",zone="."} 42

                # HELP coredns_dns_request_duration_seconds Histogram of the time (in seconds) each request took per zone.

                # TYPE coredns_dns_request_duration_seconds histogram

                coredns_dns_request_duration_seconds_bucket{le="0.00025",server="dns://:53",type="A",zone="."} 10

                '
externalDocs:
  description: CoreDNS Health Plugin Documentation
  url: https://coredns.io/plugins/health/