infra/hosts/flora-6/apps/prometheus.nix
2023-12-13 02:00:50 +01:00

28 lines
463 B
Nix

{
config,
lib,
pkgs,
flake,
...
}: {
services.prometheus = {
enable = true;
port = 9001;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
port = 9002;
};
};
scrapeConfigs = [
{
job_name = "flora-6";
static_configs = [{
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
}];
}
];
};
}