The metrics port is the whole feature

The README gives one reason for this image to exist — exposing metrics — and the Dockerfile acts on it in a single line.

Monitoring

One line of metadata

FROM coredns/coredns:1.11.1
EXPOSE 11915/tcp

EXPOSE publishes nothing. It is metadata only: a note in the image manifest (readable by tooling, and by people) saying which port the process inside listens on.

The port declared is 11915/tcp, and DNS is absent from the manifest entirely (no 53, no UDP). The one port this image bothers to write down is the one a scraper connects to. For a resolver image that is backwards, and it is the clearest statement of why the repository exists at all.

11915 also departs from the plugin's own default (CoreDNS serves metrics on 9153 out of the box). The number was picked to sit clear of everything else on the gateway hosts. A decision like that has to live somewhere a person will find it, and two lines of Dockerfile (FROM and EXPOSE) is where it ended up.

Whose metrics these are

The metrics are upstream. CoreDNS ships a prometheus plugin, and every series it exports comes out of the CoreDNS tree (request counts by zone and rcode, duration histograms, cache hits and misses). None of it is mine.

The Corefile that switches the plugin on is not in this repository. Without it the image resolves nothing and exports nothing; it stays inert until something mounts configuration into it at deploy time. My contribution to DNS observability here is a port number and a pinned base image (1.11.1, no local patches) that exports on it.

A scrape target is not monitoring

There is no scrape config in these eight files (44 lines in total), and nothing resembling one. No recording rule, no alert, no dashboard, no retention policy. Nothing here collects a sample, stores one, or pages anybody — the endpoint exists, and the collection is somebody else's scrape job.

That distinction gets conflated in the direction that flatters whoever is describing the work. Exposing metrics costs a line of Dockerfile and ten minutes. Deciding what a healthy cache-hit ratio is for a private gateway's resolver is different work; so is picking a window that will survive one slow forward without firing, and so is being woken by it at 03:00.

The earlier version of this post ran to 2,200 words on the subject (Grafana panels, alert thresholds, service discovery, anomaly detection) and described a system nobody built. The honest version is two lines long, and they are above.