modules/monitor: show truncated alerts count

This commit is contained in:
xinyangli 2025-03-26 11:24:36 +08:00
parent e5ddc316b6
commit f1ec49cc58
No known key found for this signature in database

View file

@ -120,11 +120,12 @@ in
webhook_configs = [
{
url = "${ntfyUrl}/prometheus-alerts?tpl=yes&m=${lib.escapeURL ''
{{range .alerts}}{{ if eq .status "resolved" }}{{ else }}{{ if eq .status "firing" }}🔥{{end}}{{end}}{{.labels.alertname}}
{{.annotations.summary}}
{{end}}''}";
{{ if eq .truncatedAlerts 0 }}{{ else }}{{.truncatedAlerts}} truncated
{{end}}{{range .alerts}}{{ if eq .status "resolved" }}{{ else }}{{ if eq .status "firing" }}🔥{{end}}{{end}}{{.labels.alertname}}
{{.annotations.summary}}
{{end}}''}";
send_resolved = true;
max_alerts = 5;
max_alerts = 10;
}
];
}