1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-29 19:17:45 +00:00

Remove unused exporters

This commit is contained in:
RGBCube 2024-01-13 21:13:18 +03:00
parent 6f28ea8371
commit d171c70029
No known key found for this signature in database
5 changed files with 6 additions and 41 deletions

View file

@ -5,7 +5,7 @@ let
fqdn = "metrics.${domain}";
in serverSystemConfiguration {
age.secrets."cube.mail.password.grafana" = {
age.secrets."cube.grafana.password" = {
owner = "grafana";
group = "grafana";
};
@ -27,7 +27,7 @@ in serverSystemConfiguration {
settings.security = {
admin_email = "metrics@${domain}";
admin_password = "$__file{${config.age.secrets."cube.mail.password.grafana".path}}";
admin_password = "$__file{${config.age.secrets."cube.grafana.password".path}}";
};
};

View file

@ -5,46 +5,17 @@ let
fqdn = "mail.${domain}";
in serverSystemConfiguration {
age.secrets."cube.mail.password.dmarc" = {
owner = "dmarc-exporter";
group = "dmarc-exporter";
};
services.prometheus.exporters = {
dmarc = enabled {
imap.host = domain;
imap.passwordFile = config.age.secrets."cube.mail.password.dmarc".path;
imap.username = "contact@${domain}";
listenAddress = "::";
port = 9020;
};
dovecot = enabled {
port = 9021;
socketPath = "/var/run/dovecot2/old-stats";
user = "root";
};
postfix = enabled {
port = 9022;
};
rspamd = enabled {
port = 9023;
};
services.prometheus.exporters.postfix = enabled {
port = 9020;
};
services.prometheus.scrapeConfigs = [{
job_name = "mail";
static_configs = [{
labels.job = "mail";
labels.job = "postfix";
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}"
];
}];
}];