Add prometheus and node_exporter to grafana

This commit is contained in:
Evie Litherland-Smith 2023-11-26 08:48:53 +00:00
parent 754c324f80
commit 5f65ab02ac

View file

@ -10,6 +10,22 @@
};
};
};
services.prometheus = rec {
enable = true;
port = 9001;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
port = 9002;
};
};
scrapeConfigs = [{
job_name = "legion";
static_configs =
[{ targets = [ "127.0.0.1:${toString exporters.node.port}" ]; }];
}];
};
services.caddy.virtualHosts."grafana.xenia.me.uk".extraConfig =
"reverse_proxy http://localhost:3000";
}