diff --git a/instances/freya/configuration.nix b/instances/freya/configuration.nix index b999195..25d38cd 100644 --- a/instances/freya/configuration.nix +++ b/instances/freya/configuration.nix @@ -333,6 +333,28 @@ in ]; }; + prometheus = { + enable = true; + exporters = { + node = { enable = true; enabledCollectors = [ "systemd" ]; }; + systemd.enable = true; + }; + globalConfig = { + scrape_interval = "5s"; + }; + scrapeConfigs = [ + { + job_name = "node"; + static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }]; + } + { + job_name = "systemd"; + static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; }]; + } + ]; + retentionTime = "15d"; + }; + snapper.configs = let common = { TIMELINE_CREATE = true; TIMELINE_CLEANUP = true; };