diff --git a/hosts/cube/mail.nix b/hosts/cube/mail.nix index 7af04eb..ae61ff9 100644 --- a/hosts/cube/mail.nix +++ b/hosts/cube/mail.nix @@ -28,6 +28,20 @@ in serverSystemConfiguration { }; }; + services.prometheus.scrapeConfigs = [{ + job_name = "mail"; + + static_configs = [{ + labels = [ "mail" ]; + targets = [ + "[::]:${toString config.services.prometheus.exporters.dmarc.port}" + "[::]:${toString config.services.prometheus.exporters.dovecot.port}" + "[::]:${toString config.services.prometheus.exporters.postfix.port}" + "[::]:${toString config.services.prometheus.exporters.rspamd.port}" + ]; + }]; + }]; + mailserver = enabled { inherit fqdn; diff --git a/hosts/cube/nginx.nix b/hosts/cube/nginx.nix index 8b81366..8f0af6f 100644 --- a/hosts/cube/nginx.nix +++ b/hosts/cube/nginx.nix @@ -13,6 +13,18 @@ serverSystemConfiguration { }; }; + services.prometheus.scrapeConfigs = [{ + job_name = "nginx"; + + static_configs = [{ + labels = [ "nginx" ]; + targets = [ + "[::]:${toString config.services.prometheus.exporters.nginxlog.port}" + "[::]:${toString config.services.prometheus.exporters.nginx.port}" + ]; + }]; + }]; + services.nginx = enabled { statusPage = true; diff --git a/hosts/cube/prometheus.nix b/hosts/cube/prometheus.nix index 0ca200d..22f750a 100644 --- a/hosts/cube/prometheus.nix +++ b/hosts/cube/prometheus.nix @@ -8,5 +8,14 @@ serverSystemConfiguration { enabledCollectors = [ "systemd" ]; port = 9001; }; + + scrapeConfigs = [{ + job_name = "node"; + + static_configs = [{ + labels = [ "node" ]; + targets = [ "[::]:${toString config.services.prometheus.exporters.node.port}" ]; + }]; + }]; }; }