fix: fix pve exporter configuration

This commit is contained in:
Xavier Morel
2025-11-19 22:32:54 +01:00
parent 08d95abb5a
commit aec2e5bf63
2 changed files with 13 additions and 1 deletions

View File

@@ -44,6 +44,11 @@ in
service = "prometheus"; service = "prometheus";
}; };
} }
];
}
{
job_name = "proxmox";
static_configs = [
{ {
targets = [ "localhost:9221" ]; targets = [ "localhost:9221" ];
labels = { labels = {
@@ -53,6 +58,10 @@ in
}; };
} }
]; ];
metrics_path = "/pve";
params = {
target = [ (tools.build_ip "proxmox") ];
};
} }
] ]
++ (lib.filter (sc: sc.static_configs != [ ]) ( ++ (lib.filter (sc: sc.static_configs != [ ]) (

View File

@@ -8,7 +8,10 @@
swap = 512; swap = 512;
}; };
system = { system = {
additionalPorts = [ 9090 ]; additionalPorts = [
9090
9221
];
importConfig = [ importConfig = [
../config/metrics-prometheus.nix ../config/metrics-prometheus.nix
]; ];