diff --git a/platform/monitoring/application.yaml b/platform/monitoring/application.yaml index ac83eda..cb7cead 100644 --- a/platform/monitoring/application.yaml +++ b/platform/monitoring/application.yaml @@ -73,6 +73,13 @@ spec: # que avisa os clientes) - 2026-09-29, "Ratelimit exceeded". - matchers: [alertname = "InfoInhibitor"] receiver: sem-canal + # Ruido (30/09/2026, decisao do dono): `info` (CPUThrottlingHigh...) voltaria + # 2x/dia para sempre; KubeCPUQuotaOvercommit nunca apaga num no unico com quota + # por tenant. Seguem visiveis no Prometheus/Grafana; so nao viram mensagem. + - matchers: [severity = "info"] + receiver: sem-canal + - matchers: [alertname = "KubeCPUQuotaOvercommit"] + receiver: sem-canal receivers: - name: sem-canal # Telegram (30/09/2026): sem cota, sem custo, e a rota padrao. O token @@ -83,6 +90,16 @@ spec: chat_id: 8877674767 parse_mode: HTML send_resolved: true + message: |- + {{ $sev := .CommonLabels.severity -}} + {{ if eq .Status "firing" -}} + {{ if eq $sev "critical" }}🔴 CRÍTICO{{ else if eq $sev "warning" }}🟠 ATENÇÃO{{ else if eq $sev "info" }}🔵 INFO{{ else }}⚪ ALERTA{{ end }} + {{- else }}✅ RESOLVIDO{{ end }} — {{ .CommonLabels.alertname }}{{ if .CommonLabels.canal }} 🧪 teste{{ end }} + {{ if .CommonLabels.namespace }}📦 {{ .CommonLabels.namespace }}{{ end }}{{ if .CommonLabels.pod }} · {{ .CommonLabels.pod }}{{ end }} + {{ range .Alerts -}} + • {{ if .Annotations.summary }}{{ .Annotations.summary | reReplaceAll "&" "&" | reReplaceAll "<" "<" }}{{ else if .Annotations.description }}{{ .Annotations.description | reReplaceAll "&" "&" | reReplaceAll "<" "<" }}{{ else if .Annotations.message }}{{ .Annotations.message | reReplaceAll "&" "&" | reReplaceAll "<" "<" }}{{ else }}{{ .Labels.alertname }}{{ end }} + {{ end -}} + {{ if .CommonAnnotations.runbook_url }}📖 {{ .CommonAnnotations.runbook_url }}{{ end }} - name: email-dono email_configs: - to: "carlos.oliveira@athleticmap.com"