From 8f72d77a3e40d18abd1f7798446b79c5a5769ca8 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sun, 21 Jul 2024 14:18:56 +0530 Subject: [PATCH] rico0: enable alertmanager --- hosts/rico0/services/apps/alertmanager.nix | 18 ++++++++++++++++++ hosts/rico0/services/apps/blocky.nix | 3 ++- hosts/rico0/services/apps/default.nix | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 hosts/rico0/services/apps/alertmanager.nix diff --git a/hosts/rico0/services/apps/alertmanager.nix b/hosts/rico0/services/apps/alertmanager.nix new file mode 100644 index 0000000..ea3c6dc --- /dev/null +++ b/hosts/rico0/services/apps/alertmanager.nix @@ -0,0 +1,18 @@ +_: { + services = { + caddy = { + virtualHosts."alertmanager.labs.adtya.xyz" = { + extraConfig = '' + reverse_proxy 127.0.0.1:3100 + tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key + ''; + }; + }; + prometheus.alertmanager = { + enable = true; + listenAddress = "127.0.0.1"; + port = 9093; + webExternalUrl = "https://alertmanager.labs.adtya.xyz/"; + }; + }; +} diff --git a/hosts/rico0/services/apps/blocky.nix b/hosts/rico0/services/apps/blocky.nix index 7f0f02a..0817500 100644 --- a/hosts/rico0/services/apps/blocky.nix +++ b/hosts/rico0/services/apps/blocky.nix @@ -57,8 +57,9 @@ _: { "rico2.labs.adtya.xyz" = "10.10.10.12,fd7c:585c:c4ae::12"; "wynne.labs.adtya.xyz" = "10.10.10.13,fd7c:585c:c4ae::13"; "layne.labs.adtya.xyz" = "10.10.10.14,fd7c:585c:c4ae::14"; - "frp.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; + "alertmanager.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; "blocky.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; + "frp.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; "grafana.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; "prometheus.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; "transmission.labs.adtya.xyz" = "10.10.10.14,fd7c:585c:c4ae::14"; diff --git a/hosts/rico0/services/apps/default.nix b/hosts/rico0/services/apps/default.nix index 37e9c31..1c8742e 100644 --- a/hosts/rico0/services/apps/default.nix +++ b/hosts/rico0/services/apps/default.nix @@ -1,5 +1,6 @@ _: { imports = [ + ./alertmanager.nix ./blocky.nix ./grafana.nix ./prometheus.nix