From 110f7dbc93eb8fd27f5939f7de60f7b73afa669a Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Mon, 30 May 2022 00:43:07 +0900 Subject: [PATCH] coredns metrics listen address to 127.0.0.1:9153 --- compose.yml | 4 +++- etc/coredns/Corefile | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/compose.yml b/compose.yml index 5ee4afa..29a30ba 100644 --- a/compose.yml +++ b/compose.yml @@ -39,7 +39,9 @@ services: image: coredns/coredns:1.9.3@sha256:8e352a029d304ca7431c6507b56800636c321cb52289686a581ab70aaa8a2e2a restart: unless-stopped expose: ["443"] - ports: ["853:853"] + ports: + - "853:853" + - "127.0.0.1:9153:9153" volumes: - ./etc/coredns:/etc/coredns - caddy_data:/var/lib/caddy/data diff --git a/etc/coredns/Corefile b/etc/coredns/Corefile index 173a649..93f00b7 100644 --- a/etc/coredns/Corefile +++ b/etc/coredns/Corefile @@ -11,3 +11,6 @@ https://. tls://. { forward . /etc/resolv.conf reload } +. { + prometheus 0.0.0.0:9153 +}