From e12e49168a1e5d703d669cfc7b5888d128911b2b Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 14 Sep 2024 17:57:09 +0530 Subject: [PATCH] all: enable metrics from caddy --- hosts/shared/caddy.nix | 3 +++ hosts/shared/prometheus-exporters.nix | 1 + 2 files changed, 4 insertions(+) diff --git a/hosts/shared/caddy.nix b/hosts/shared/caddy.nix index 13d1325..b2e9c8a 100644 --- a/hosts/shared/caddy.nix +++ b/hosts/shared/caddy.nix @@ -14,6 +14,9 @@ email = "admin@acomputer.lol"; globalConfig = '' acme_dns digitalocean {env.DO_API_TOKEN} + servers { + metrics + } ''; logFormat = "level INFO"; }; diff --git a/hosts/shared/prometheus-exporters.nix b/hosts/shared/prometheus-exporters.nix index 94dce4f..0a46f2f 100644 --- a/hosts/shared/prometheus-exporters.nix +++ b/hosts/shared/prometheus-exporters.nix @@ -3,6 +3,7 @@ caddy = { virtualHosts."${config.networking.hostName}.labs.adtya.xyz" = { extraConfig = '' + metrics /caddy-metrics handle /metrics { reverse_proxy 127.0.0.1:9100 }