treewide: use localhost instead of ipv4

This commit is contained in:
Felix Buehler 2024-12-27 20:30:21 +01:00
parent 68a379bb34
commit c105a223a7
24 changed files with 42 additions and 53 deletions

View file

@ -25,11 +25,9 @@ in
];
extraFlags = [ "--collector.textfile.directory=/etc/prometheus-node-exporter-text-files" ];
port = 9100;
listenAddress = "127.0.0.1";
};
systemd = {
enable = true;
listenAddress = "127.0.0.1";
};
};
@ -38,7 +36,7 @@ in
job_name = "node";
static_configs = [
{
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ];
labels = {
instance = config.networking.hostName;
};
@ -49,7 +47,7 @@ in
job_name = "systemd";
static_configs = [
{
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.systemd.port}" ];
targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ];
labels = {
instance = config.networking.hostName;
};