Add pve monitoring
This commit is contained in:
@@ -4,5 +4,6 @@
|
||||
./loki.nix
|
||||
./grafana.nix
|
||||
./prometheus.nix
|
||||
./pve.nix
|
||||
];
|
||||
}
|
||||
|
@@ -124,6 +124,34 @@
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "pve-exporter";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "10.69.12.75" ];
|
||||
}
|
||||
];
|
||||
metrics_path = "/pve";
|
||||
params = {
|
||||
module = [ "default" ];
|
||||
cluster = [ "1" ];
|
||||
node = [ "1" ];
|
||||
};
|
||||
relabel_configs = [
|
||||
{
|
||||
source_labels = [ "__address__" ];
|
||||
target_label = "__param_target";
|
||||
}
|
||||
{
|
||||
source_labels = [ "__param_target" ];
|
||||
target_label = "instance";
|
||||
}
|
||||
{
|
||||
target_label = "__address__";
|
||||
replacement = "127.0.0.1:9221";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
17
services/monitoring/pve.nix
Normal file
17
services/monitoring/pve.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
sops.secrets.pve_exporter = {
|
||||
format = "yaml";
|
||||
sopsFile = ../../secrets/monitoring01/pve-exporter.yaml;
|
||||
key = "";
|
||||
mode = "0444";
|
||||
};
|
||||
services.prometheus.exporters.pve = {
|
||||
enable = true;
|
||||
configFile = config.sops.secrets.pve_exporter.path;
|
||||
collectors = {
|
||||
cluster = false;
|
||||
replication = false;
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user