From 5af18ca418e3e2b69cd47897d4803fd0f01bdc0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Wed, 4 Dec 2024 04:02:24 +0100 Subject: [PATCH] Gather caddy metrics --- services/http-proxy/proxy.nix | 3 +++ services/monitoring/prometheus.nix | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/services/http-proxy/proxy.nix b/services/http-proxy/proxy.nix index 2b038ed..f1d1549 100644 --- a/services/http-proxy/proxy.nix +++ b/services/http-proxy/proxy.nix @@ -5,6 +5,9 @@ configFile = pkgs.writeText "Caddyfile" '' { acme_ca https://ca.home.2rjus.net/acme/acme/directory + servers { + metrics + } } nzbget.home.2rjus.net { diff --git a/services/monitoring/prometheus.nix b/services/monitoring/prometheus.nix index 1d6fed1..16e00c1 100644 --- a/services/monitoring/prometheus.nix +++ b/services/monitoring/prometheus.nix @@ -152,6 +152,14 @@ } ]; } + { + job_name = "caddy"; + static_configs = [ + { + targets = [ "http-proxy.home.2rjus.net:2019" ]; + } + ]; + } ]; }; }