adyya-flake/services/monitoring/prometheus.mod.nix
Ittihadyya 7c96e82f83
Some checks failed
/ Check formatting (push) Failing after 1s
uwu please
2024-12-20 18:01:32 +02:00

42 lines
829 B
Nix

{
universal.modules = [
{
services.prometheus.exporters = {
node = {
enable = true;
enabledCollectors = ["systemd"];
port = 6703;
};
varnish.enable = true;
};
}
];
glucose.modules = [
({
nixpkgs,
molecules,
...
}: let
ip = i: "10.24.1.${toString i}";
ips = builtins.mapAttrs (nixpkgs.lib.const ip) molecules;
ips' = builtins.mapAttrs (name: ip: "${ip}:6703") ips;
in {
services.prometheus = {
enable = true;
port = 6750;
enableReload = true;
scrapeConfigs = [
{
job_name = "devices";
static_configs = [
{
targets = ips';
}
];
}
];
};
})
];
}