monitoring: add nixos-exporter to all hosts
Add nixos-exporter prometheus exporter to track NixOS generation metrics and flake revision status across all hosts. Changes: - Add nixos-exporter flake input - Add commonModules list in flake.nix for modules shared by all hosts - Enable nixos-exporter in system/monitoring/metrics.nix - Configure Prometheus to scrape nixos-exporter on all hosts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,4 +18,21 @@
|
||||
"--systemd.collector.enable-ip-accounting"
|
||||
];
|
||||
};
|
||||
|
||||
services.prometheus.exporters.nixos = {
|
||||
enable = true;
|
||||
# Default port: 9971
|
||||
flake = {
|
||||
enable = true;
|
||||
url = "git+https://git.t-juice.club/torjus/nixos-servers.git";
|
||||
};
|
||||
};
|
||||
|
||||
# Register nixos-exporter as a Prometheus scrape target
|
||||
homelab.monitoring.scrapeTargets = [
|
||||
{
|
||||
job_name = "nixos-exporter";
|
||||
port = 9971;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user