From 1f4e9a620b4840bfde65c6ff59ac408f32210e06 Mon Sep 17 00:00:00 2001 From: quitte Date: Thu, 2 May 2024 10:48:26 +0200 Subject: [PATCH] trying to get postfix running --- modules/monitoring.nix | 12 +++++++++--- overlays/default.nix | 10 ++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/modules/monitoring.nix b/modules/monitoring.nix index 14af2d8..5aa664a 100644 --- a/modules/monitoring.nix +++ b/modules/monitoring.nix @@ -45,8 +45,7 @@ in }; postfix = { enable = true; - port = 25; - user = config.serivces.postfix.user; + port = 9003; }; }; scrapeConfigs = [ @@ -57,13 +56,20 @@ in }]; scrape_interval = "15s"; } + { + job_name = "postfix"; + static_configs = [{ + targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.postfix.port}" ]; + }]; + # scrape_interval = "60s"; + } ]; }; # nginx reverse proxy services.nginx.virtualHosts.${domain} = { locations."/" = { - proxyPass = "http://localhost:${toString config.services.grafana.port}"; + proxyPass = "http://localhost:${toString config.services.grafana.settings.server.http_port}"; proxyWebsockets = true; }; }; diff --git a/overlays/default.nix b/overlays/default.nix index 52de42e..d5b5aae 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,6 +1,7 @@ _final: prev: let inherit (prev) fetchurl; + inherit (prev) fetchFromGitHub; in { # AGDSN is running an outdated version that we have to comply to @@ -11,5 +12,14 @@ in sha256 = "sha256-3w+FJezbo4DnS1N8pxrfO3WWWT8CGJtZqw6//IXMyN4="; }; })); + # (hopefully) fix systemd journal reading + prometheus-postfix-exporter = prev.prometheus-postfix-exporter.overrideAttrs (old: rec { + src = fetchFromGitHub { + owner = "adangel"; + repo = "postfix_exporter"; + rev = "414ac12ee63415eede46cb3084d755a6da6fba23"; + hash = "sha256-m1kVaO3N7XC1vtnxXX9kMiEFPmZuoopRUYgA7gQzP8w="; + }; + }); }