From 11f5557a7a80750608926e58ab92db50151faec9 Mon Sep 17 00:00:00 2001 From: Pablo Ovelleiro Corral Date: Sat, 27 Apr 2024 01:37:03 +0200 Subject: [PATCH] Add reverseproxy for alerts.pub.solar Co-authored-by: teutat3s --- modules/prometheus/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/prometheus/default.nix b/modules/prometheus/default.nix index 1cad3a3..a402f35 100644 --- a/modules/prometheus/default.nix +++ b/modules/prometheus/default.nix @@ -12,6 +12,15 @@ owner = "prometheus"; }; + services.caddy.virtualHosts."prometheus.${config.pub-solar-os.networking.domain}" = { + logFormat = lib.mkForce '' + output discard + ''; + extraConfig = '' + reverse_proxy :${toString config.services.prometheus.alertmanager.port} + ''; + }; + services.prometheus = { enable = true; port = 9001;