From c789b89793781dc6287463861ac53a3d6a8f193d Mon Sep 17 00:00:00 2001 From: illustris Date: Sun, 28 Jan 2024 13:37:09 +0530 Subject: [PATCH] add prom --- configuration.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/configuration.nix b/configuration.nix index e8e752e..8ad3a78 100644 --- a/configuration.nix +++ b/configuration.nix @@ -134,6 +134,26 @@ enable = true; settings.X11Forwarding = true; }; + prometheus = { + enable = true; + exporters = { + node = { + enable = true; + enabledCollectors = [ "systemd" ]; + }; + }; + scrapeConfigs = [ + { + job_name = "node_exporter"; + scrape_interval = "10s"; + static_configs = [ + { + targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; + } + ]; + } + ]; + }; qemuGuest.enable = true; udev = { # TODO: check if still needed @@ -151,6 +171,14 @@ }; zfs.autoScrub.enable = true; }; + # systemd = { + # # Disable autostart + # services.grafana = { + # wantedBy = lib.mkForce []; + # serviceConfig.SupplementaryGroups = [ config.users.groups.keys.name ]; + # }; + # services.docker.wantedBy = lib.mkForce []; + # }; time.timeZone = "Asia/Kolkata";