diff options
Diffstat (limited to 'ops/machines/whitby')
-rw-r--r-- | ops/machines/whitby/default.nix | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/ops/machines/whitby/default.nix b/ops/machines/whitby/default.nix index eb93aef69dac..df280b96f7c1 100644 --- a/ops/machines/whitby/default.nix +++ b/ops/machines/whitby/default.nix @@ -1,5 +1,5 @@ { depot, lib, pkgs, ... }: # readTree options -config: # passed by module system +{ config, ... }: # passed by module system let inherit (builtins) listToAttrs; @@ -357,6 +357,29 @@ in lib.fix(self: { applicationCredentials = "/var/lib/journaldriver/key.json"; }; + # Configure Prometheus & Grafana. Exporter configuration for + # Prometheus is inside the respective service modules. + services.prometheus = { + enable = true; + exporters.node = { + enable = true; + + enabledCollectors = [ + "logind" + "processes" + "systemd" + ]; + }; + + scrapeConfigs = [{ + job_name = "node"; + scrape_interval = "5s"; + static_configs = [{ + targets = ["localhost:${toString config.services.prometheus.exporters.node.port}"]; + }]; + }]; + }; + security.sudo.extraRules = [ { groups = ["wheel"]; |