trying to get postfix running

This commit is contained in:
quitte 2024-05-02 10:48:26 +02:00
parent ab5df354ff
commit 1f4e9a620b
2 changed files with 19 additions and 3 deletions

View file

@ -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;
};
};

View file

@ -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=";
};
});
}