forked from pub-solar/infra
Add alertmanager config
This commit is contained in:
parent
505d0f34ea
commit
d8e7b50ddd
|
@ -1,6 +1,4 @@
|
||||||
{ config
|
{ config
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, flake
|
, flake
|
||||||
, ...
|
, ...
|
||||||
}: {
|
}: {
|
||||||
|
@ -65,5 +63,39 @@
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
alertmanager = {
|
||||||
|
enable = true;
|
||||||
|
# port = 9093; # Default
|
||||||
|
webExternalUrl = "https://alerts.pub.solar";
|
||||||
|
# environmentFile = "${config.age.secrets.nachtigall-alertmanager-envfile.path}";
|
||||||
|
configuration = {
|
||||||
|
|
||||||
|
route = {
|
||||||
|
receiver = "all";
|
||||||
|
group_by = [ "instance" ];
|
||||||
|
group_wait = "30s";
|
||||||
|
group_interval = "2m";
|
||||||
|
repeat_interval = "24h";
|
||||||
|
};
|
||||||
|
|
||||||
|
receivers = [{
|
||||||
|
name = "all";
|
||||||
|
# Email config documentation: https://prometheus.io/docs/alerting/latest/configuration/#email_config
|
||||||
|
email_configs = [{
|
||||||
|
send_resolved = true;
|
||||||
|
to = "TODO";
|
||||||
|
from = "alerts@pub.solar";
|
||||||
|
smarthost = "TODO";
|
||||||
|
auth_username = "TODO";
|
||||||
|
auth_password_file = "${config.age.secrets.nachtigall-alertmanager-smtp-password.path}";
|
||||||
|
require_tls = true;
|
||||||
|
}];
|
||||||
|
# TODO:
|
||||||
|
# For matrix notifications, look into: https://github.com/pinpox/matrix-hook and add a webhook
|
||||||
|
# webhook_configs = [ { url = "http://127.0.0.1:11000/alert"; } ];
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue