services/monitoring: Fix missing firewall rule
I didn't notice this was missing in #5 until after deploying it. Since the ports on the monitoring-network-interface (ens10) were not open, scraping would fail and thus generate alerts.
This commit is contained in:
parent
d199834a61
commit
935f51e7d9
1 changed files with 9 additions and 0 deletions
|
@ -132,6 +132,15 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.interfaces.ens10.allowedTCPPorts = let
|
||||||
|
inherit (config.services) prometheus;
|
||||||
|
ifEnabled = x: lib.optional x.enable x.port;
|
||||||
|
in (
|
||||||
|
(ifEnabled prometheus)
|
||||||
|
++ (ifEnabled prometheus.alertmanager)
|
||||||
|
++ (ifEnabled prometheus.exporters.node)
|
||||||
|
);
|
||||||
|
|
||||||
services.prometheus = {
|
services.prometheus = {
|
||||||
enable = true;
|
enable = true;
|
||||||
webExternalUrl = "https://${fqdn}/prometheus/";
|
webExternalUrl = "https://${fqdn}/prometheus/";
|
||||||
|
|
Loading…
Reference in a new issue