22 lines
528 B
Nix
22 lines
528 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
services.stalwart-mail.settings = {
|
|
metrics.prometheus.enable = true;
|
|
};
|
|
|
|
services.prometheus.scrapeConfigs = [
|
|
{
|
|
job_name = "stalwart";
|
|
metrics_path = "/metrics/prometheus";
|
|
static_configs = [{
|
|
targets = [ "localhost:${toString config.mine.shared.settings.mail.ports.http_management}" ];
|
|
}];
|
|
metric_relabel_configs = [{
|
|
source_labels = [ "__name__" ];
|
|
target_label = "__name__";
|
|
replacement = "stalwart_$1";
|
|
}];
|
|
}
|
|
];
|
|
}
|