From f978ecd349db5cc6a89e642dcb74c2308c45b0ea Mon Sep 17 00:00:00 2001 From: deploy Date: Wed, 30 Sep 2026 15:05:08 +0000 Subject: [PATCH] =?UTF-8?q?feat(monitoring):=20Telegram=20=E2=80=94=20icon?= =?UTF-8?q?e=20por=20gravidade,=20resolvido=20marcado;=20info=20e=20KubeCP?= =?UTF-8?q?UQuotaOvercommit=20sem=20canal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/monitoring/application.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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"