forked from Drift/pvv-nixos-config
add ipv6 to allowed ip addresses for metrics exporters
This commit is contained in:
parent
473170cc41
commit
1ea40456a5
@ -184,7 +184,15 @@ in {
|
||||
|
||||
metricsPath = w: "/metrics/${w.type}/${toString w.index}";
|
||||
proxyPath = w: "http://${socketAddress w}/_synapse/metrics";
|
||||
in lib.mapAttrs' (n: v: lib.nameValuePair (metricsPath v) ({ proxyPass = proxyPath v; }))
|
||||
in lib.mapAttrs' (n: v: lib.nameValuePair
|
||||
(metricsPath v) ({
|
||||
proxyPass = proxyPath v;
|
||||
extraConfig = ''
|
||||
allow ${values.ildkule.ipv4};
|
||||
allow [${values.ildkule.ipv6}];
|
||||
deny all;
|
||||
'';
|
||||
}))
|
||||
cfg.workers.instances;
|
||||
})
|
||||
({
|
||||
@ -192,6 +200,7 @@ in {
|
||||
proxyPass = "http://127.0.0.1:9000/_synapse/metrics";
|
||||
extraConfig = ''
|
||||
allow ${values.ildkule.ipv4};
|
||||
allow [${values.ildkule.ipv6}];
|
||||
deny all;
|
||||
'';
|
||||
};
|
||||
@ -213,10 +222,6 @@ in {
|
||||
{ targets = endpoints;
|
||||
labels = { };
|
||||
}]) + "/";
|
||||
extraConfig = ''
|
||||
allow ${values.ildkule.ipv4};
|
||||
deny all;
|
||||
'';
|
||||
};
|
||||
})];
|
||||
}
|
||||
|
@ -9,7 +9,10 @@
|
||||
|
||||
systemd.services.prometheus-node-exporter.serviceConfig = {
|
||||
IPAddressDeny = "any";
|
||||
IPAddressAllow = values.ildkule.ipv4;
|
||||
IPAddressAllow = [
|
||||
values.ildkule.ipv4
|
||||
values.ildkule.ipv6
|
||||
];
|
||||
};
|
||||
|
||||
services.promtail = {
|
||||
|
Loading…
Reference in New Issue
Block a user