From 3f47b32983b7f12cc3985196897dd061048f42c5 Mon Sep 17 00:00:00 2001 From: Joachim Stramke Date: Mon, 29 Apr 2024 15:12:52 +0200 Subject: [PATCH] add first node --- modules/monitoring.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/monitoring.nix b/modules/monitoring.nix index ff8dc58..b25204d 100644 --- a/modules/monitoring.nix +++ b/modules/monitoring.nix @@ -39,6 +39,21 @@ in services.prometheus = { enable = true; port = 9001; + exporters = { + node = { + enable = true; + enabledCollectors = [ "systemd" ]; + port = 9002; + }; + }; + scrapeConfigs = [ + { + job_name = "node"; + static_configs = [{ + targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ]; + }]; + } + ]; }; # nginx reverse proxy