Add dmarc metrics

This commit is contained in:
Paul-Henri Froidmont 2022-11-07 17:32:20 +01:00
parent b173d18275
commit 0fca457d7a
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
4 changed files with 704 additions and 2 deletions

View file

@ -26,6 +26,9 @@
nixCacheKey = {
key = "nix/cache_secret_key";
};
dmarcExporterPassword = {
key = "dmarc_exporter/password";
};
};
custom = {
@ -75,6 +78,23 @@
services.openssh.enable = true;
};
services.prometheus.exporters.dmarc = {
enable = true;
debug = true;
imap = {
host = "mail.banditlair.com";
username = "paultrial@banditlair.com";
passwordFile = "/run/credentials/prometheus-dmarc-exporter.service/password";
};
folders = {
inbox = "dmarc_reports";
done = "Archives.dmarc_report_processed";
error = "Archives.dmarc_report_error";
};
};
systemd.services.prometheus-dmarc-exporter.serviceConfig.LoadCredential =
"password:${config.sops.secrets.dmarcExporterPassword.path}";
networking.firewall.allowedTCPPorts = [ 80 443 18080 ];
networking.firewall.interfaces.vlan4001.allowedTCPPorts = [ config.services.loki.configuration.server.http_listen_port ];