nix(loki): use variable for hostname in prometheus

This commit is contained in:
surtur 2023-12-09 21:47:29 +01:00
parent 6f4a415650
commit b38bdf3e0a
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -182,14 +182,14 @@
static_configs = [ static_configs = [
{ {
targets = [ targets = [
"loki.local:${toString config.services.prometheus.exporters.node.port}" "${config.networking.hostName}.local:${toString config.services.prometheus.exporters.node.port}"
]; ];
} }
]; ];
} }
{ {
job_name = "coredns"; job_name = "coredns";
static_configs = [{targets = ["loki.local:9153"];}]; static_configs = [{targets = ["${config.networking.hostName}.local:9153"];}];
} }
]; ];
}; };