From d9839c14723493f43a27a9ebb8032d5d8f933727 Mon Sep 17 00:00:00 2001 From: xqtc161 Date: Sun, 16 Jun 2024 11:52:36 +0200 Subject: [PATCH 1/2] Add wg monitor to prometheus --- hosts/x86_64-linux/beleth/monitoring.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/x86_64-linux/beleth/monitoring.nix b/hosts/x86_64-linux/beleth/monitoring.nix index 9b28cda..fef1e67 100644 --- a/hosts/x86_64-linux/beleth/monitoring.nix +++ b/hosts/x86_64-linux/beleth/monitoring.nix @@ -20,6 +20,9 @@ enabledCollectors = ["systemd" "sysctl" "powersupplyclass"]; port = 9002; }; + wireguard = { + enable = true; + }; }; scrapeConfigs = [ { From cc55254889fae65915c9760ae78bc70c84c2b43f Mon Sep 17 00:00:00 2001 From: xqtc161 Date: Sun, 16 Jun 2024 12:09:34 +0200 Subject: [PATCH 2/2] Add wg exporter to scrape_config --- hosts/x86_64-linux/beleth/monitoring.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/x86_64-linux/beleth/monitoring.nix b/hosts/x86_64-linux/beleth/monitoring.nix index fef1e67..bd23009 100644 --- a/hosts/x86_64-linux/beleth/monitoring.nix +++ b/hosts/x86_64-linux/beleth/monitoring.nix @@ -29,7 +29,10 @@ job_name = "beleth"; static_configs = [ { - targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"]; + targets = [ + "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" + "127.0.0.1:${toString config.services.prometheus.exporters.wireguard.port}" + ]; } ]; }