feat(monitoring): Telegram — icone por gravidade, resolvido marcado; info e KubeCPUQuotaOvercommit sem canal

This commit is contained in:
deploy
2026-09-30 15:05:08 +00:00
parent 71aa5ac7f5
commit f978ecd349
+17
View File
@@ -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" }}🔴 <b>CRÍTICO</b>{{ else if eq $sev "warning" }}🟠 <b>ATENÇÃO</b>{{ else if eq $sev "info" }}🔵 <b>INFO</b>{{ else }}⚪ <b>ALERTA</b>{{ end }}
{{- else }}✅ <b>RESOLVIDO</b>{{ end }} — <b>{{ .CommonLabels.alertname }}</b>{{ if .CommonLabels.canal }} 🧪 <i>teste</i>{{ end }}
{{ if .CommonLabels.namespace }}📦 {{ .CommonLabels.namespace }}{{ end }}{{ if .CommonLabels.pod }} · {{ .CommonLabels.pod }}{{ end }}
{{ range .Alerts -}}
• {{ if .Annotations.summary }}{{ .Annotations.summary | reReplaceAll "&" "&amp;" | reReplaceAll "<" "&lt;" }}{{ else if .Annotations.description }}{{ .Annotations.description | reReplaceAll "&" "&amp;" | reReplaceAll "<" "&lt;" }}{{ else if .Annotations.message }}{{ .Annotations.message | reReplaceAll "&" "&amp;" | reReplaceAll "<" "&lt;" }}{{ else }}{{ .Labels.alertname }}{{ end }}
{{ end -}}
{{ if .CommonAnnotations.runbook_url }}📖 {{ .CommonAnnotations.runbook_url }}{{ end }}
- name: email-dono
email_configs:
- to: "carlos.oliveira@athleticmap.com"