From 19723f3812721e6e09b4e08978e06aac778aef4e Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 10 Sep 2024 14:25:00 +0200 Subject: [PATCH] monitoring: add prometheus-exporter, promtail to delite, blue-shell add instance labels to garage scrape jobs --- hosts/default.nix | 8 ++++---- modules/prometheus/default.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/hosts/default.nix b/hosts/default.nix index 198ac7e..fd8353e 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -105,8 +105,8 @@ self.nixosModules.overlays self.nixosModules.unlock-luks-on-boot self.nixosModules.core - #self.nixosModules.prometheus-exporters - #self.nixosModules.promtail + self.nixosModules.prometheus-exporters + self.nixosModules.promtail self.nixosModules.garage self.nixosModules.nginx @@ -122,8 +122,8 @@ self.nixosModules.overlays self.nixosModules.unlock-luks-on-boot self.nixosModules.core - #self.nixosModules.prometheus-exporters - #self.nixosModules.promtail + self.nixosModules.prometheus-exporters + self.nixosModules.promtail self.nixosModules.garage self.nixosModules.nginx diff --git a/modules/prometheus/default.nix b/modules/prometheus/default.nix index db6ac05..19e3384 100644 --- a/modules/prometheus/default.nix +++ b/modules/prometheus/default.nix @@ -74,6 +74,22 @@ instance = "trinkgenossin"; }; } + { + targets = [ + "delite.wg.${config.pub-solar-os.networking.domain}:${toString config.services.prometheus.exporters.node.port}" + ]; + labels = { + instance = "delite"; + }; + } + { + targets = [ + "blue-shell.wg.${config.pub-solar-os.networking.domain}:${toString config.services.prometheus.exporters.node.port}" + ]; + labels = { + instance = "blue-shell"; + }; + } ]; } { @@ -94,9 +110,26 @@ { targets = [ "trinkgenossin.wg.${config.pub-solar-os.networking.domain}:3903" + ]; + labels = { + instance = "trinkgenossin"; + }; + } + { + targets = [ "delite.wg.${config.pub-solar-os.networking.domain}:3903" + ]; + labels = { + instance = "delite"; + }; + } + { + targets = [ "blue-shell.wg.${config.pub-solar-os.networking.domain}:3903" ]; + labels = { + instance = "blue-shell"; + }; } ]; }