server/home/metrics: listen on 127.0.0.1 only

This commit is contained in:
chayleaf 2023-07-28 21:56:34 +07:00
parent ed333d5999
commit 50279b7c0f

View file

@ -149,19 +149,25 @@ in {
node = { node = {
enable = true; enable = true;
enabledCollectors = [ "logind" "systemd" ]; enabledCollectors = [ "logind" "systemd" ];
listenAddress = "127.0.0.1";
port = 9101; # cups is 9100 port = 9101; # cups is 9100
}; };
dovecot = { dovecot = {
enable = true; enable = true;
scopes = [ "user" "global" ]; scopes = [ "user" "global" ];
listenAddress = "127.0.0.1";
}; };
nextcloud = { nextcloud = {
enable = true; enable = true;
url = "https://cloud.${cfg.domainName}"; url = "https://cloud.${cfg.domainName}";
username = "nextcloud-exporter"; username = "nextcloud-exporter";
passwordFile = "/secrets/nextcloud_exporter_password"; passwordFile = "/secrets/nextcloud_exporter_password";
listenAddress = "127.0.0.1";
};
nginx = {
enable = true;
listenAddress = "127.0.0.1";
}; };
nginx = { enable = true; };
nginxlog = { nginxlog = {
enable = true; enable = true;
group = "nginx"; group = "nginx";
@ -172,13 +178,32 @@ in {
source.files = [ "/var/log/nginx/comments.log" ]; source.files = [ "/var/log/nginx/comments.log" ];
} }
]; ];
listenAddress = "127.0.0.1";
};
postfix = {
enable = true;
listenAddress = "127.0.0.1";
};
postgres = {
enable = true;
listenAddress = "127.0.0.1";
};
process = {
enable = true;
listenAddress = "127.0.0.1";
};
redis = {
enable = true;
listenAddress = "127.0.0.1";
};
rspamd = {
enable = true;
listenAddress = "127.0.0.1";
};
smartctl = {
enable = true;
listenAddress = "127.0.0.1";
}; };
postfix = { enable = true; };
postgres = { enable = true; };
process.enable = true;
redis.enable = true;
rspamd.enable = true;
smartctl.enable = true;
}; };
checkConfig = "syntax-only"; checkConfig = "syntax-only";
scrapeConfigs = [ scrapeConfigs = [