From 4c60f7b5c15cda04e318fd5e9f36bbcb79442090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Wed, 4 Dec 2024 04:09:06 +0100 Subject: [PATCH] Fix caddy metrics endpoint --- services/http-proxy/proxy.nix | 9 ++++++--- services/monitoring/prometheus.nix | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/services/http-proxy/proxy.nix b/services/http-proxy/proxy.nix index f1d1549..68bf0f9 100644 --- a/services/http-proxy/proxy.nix +++ b/services/http-proxy/proxy.nix @@ -5,9 +5,6 @@ configFile = pkgs.writeText "Caddyfile" '' { acme_ca https://ca.home.2rjus.net/acme/acme/directory - servers { - metrics - } } nzbget.home.2rjus.net { @@ -42,6 +39,12 @@ } reverse_proxy http://ha1.home.2rjus.net:8080 } + http://http-proxy.home.2rjus.net/metrics { + log { + output file /var/log/caddy/caddy-metrics.log + } + metrics + } ''; }; } diff --git a/services/monitoring/prometheus.nix b/services/monitoring/prometheus.nix index 16e00c1..3e59b80 100644 --- a/services/monitoring/prometheus.nix +++ b/services/monitoring/prometheus.nix @@ -156,7 +156,7 @@ job_name = "caddy"; static_configs = [ { - targets = [ "http-proxy.home.2rjus.net:2019" ]; + targets = [ "http-proxy.home.2rjus.net" ]; } ]; }