The NixOS module concatenates listenAddress and port as `${a}:${p}`,
so "::" became ":::9100" and node_exporter rejected it ("too many
colons in address"). Use "[::]" so the result is "[::]:9100".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
12 lines
381 B
Nix
12 lines
381 B
Nix
# Prometheus node_exporter — exposes host metrics on :9100, scoped to the
|
|
# ZeroTier mesh so only sunken-ship (the Prometheus server) can scrape it.
|
|
{ ... }: {
|
|
services.prometheus.exporters.node = {
|
|
enable = true;
|
|
port = 9100;
|
|
listenAddress = "[::]";
|
|
enabledCollectors = [ "systemd" ];
|
|
};
|
|
|
|
networking.firewall.interfaces."zt+".allowedTCPPorts = [ 9100 ];
|
|
}
|