Pular para o conteúdo principal
O sistema de notificações da plataforma AIOps permite que alertas, mudancas de estado de Issues e violações de SLA sejam comunicados automaticamente para as equipes corretas, nos canais corretos, no momento correto. Combinado com politicas de escalacao, garante que nenhum incidente critico passe despercebido.

Visao Geral

O NotificationEngine e acionado sempre que:
EventoDescrição
Issue state changeTransicao de estado (Detected, Analyzing, Remediating, Resolved, Escalated)
SLO burn rate alertBurn rate excede threshold em janelas short+long
SLA violationTempo de resposta ou resolucao excedeu o limite
Remediation failureRemediationPlan falhou e atingiu max attempts
Approval requestApprovalRequest criado aguardando aprovação

NotificationPolicy CRD

O NotificationPolicy define quais eventos disparam notificações, para quais canais, e com quais regras de throttling.
apiVersion: platform.chatcli.io/v1alpha1
kind: NotificationPolicy
metadata:
  name: production-alerts
  namespace: production
spec:
  rules:
    - name: critical-incidents
      match:
        severities: [critical, high]
        signalTypes: [oom_kill, deploy_failing, error_rate]
        namespaces: [production, payments]
        resourceKinds: [Deployment, StatefulSet]
        states: [Detected, Escalated]
      channels:
        - type: slack
          config:
            webhook_url: "https://hooks.slack.com/services/T00/B00/xxxxx"
            channel: "#incidents-critical"
            mention: "@oncall-sre"
        - type: pagerduty
          config:
            routing_key: "R0xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
            severity_mapping:
              critical: critical
              high: error
        - type: opsgenie
          config:
            api_key: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
            priority_mapping:
              critical: P1
              high: P2
            responders:
              - type: team
                name: platform-sre
            tags: [production, aiops]

    - name: low-severity-digest
      match:
        severities: [medium, low]
        states: [Resolved]
      channels:
        - type: email
          config:
            smtp_host: smtp.company.com
            smtp_port: 587
            from: "aiops@company.com"
            to: ["sre-team@company.com"]
            subject_template: "[ChatCLI AIOps] {{.Severity}} - {{.ResourceName}}"
            tls_skip_verify: false

    - name: all-events-webhook
      match:
        severities: [critical, high, medium, low]
      channels:
        - type: webhook
          config:
            url: "https://internal-api.company.com/aiops/events"
            secret: "whsec_xxxxxxxxxxxxxxxxxxxxxxxx"
            headers:
              X-Source: chatcli-aiops
              X-Environment: production

    - name: teams-infra
      match:
        severities: [critical, high]
        namespaces: [infrastructure]
      channels:
        - type: teams
          config:
            webhook_url: "https://outlook.office.com/webhook/xxx/IncomingWebhook/yyy/zzz"

  throttle:
    deduplicationWindow: "5m"
    maxPerHour: 60
    groupBy: [namespace, resourceName, severity]

Campos do Spec

NotificationRule

Cada regra define um par match + channels. Multiplas regras podem ser definidas em uma mesma policy.
CampoTipoObrigatórioDescrição
namestringSimNome único da regra dentro da policy
matchNotificationMatchSimCriterios de matching
channels[]ChannelConfigSimLista de canais de destino

NotificationMatch

Todos os campos são opcionais. Se omitido, funciona como wildcard (match all). Quando multiplos campos são definidos, a logica e AND entre campos e OR dentro de cada campo.
CampoTipoDescrição
severities[]stringcritical, high, medium, low
signalTypes[]stringoom_kill, pod_restart, pod_not_ready, deploy_failing, error_rate, latency_spike
namespaces[]stringNamespaces K8s a monitorar
resourceKinds[]stringDeployment, StatefulSet, DaemonSet
states[]stringDetected, Analyzing, Remediating, Resolved, Escalated, Failed
Combine severities com states para controle fino. Exemplo: notifique critical apenas em Detected e Escalated, evitando ruido de transicoes intermediarias.

ThrottleConfig

Controla a frequência e deduplicacao de notificações para evitar alert fatigue.
CampoTipoPadrãoDescrição
deduplicationWindowduration5mJanela temporal para deduplicacao. Notificações identicas dentro desta janela são suprimidas.
maxPerHourint120Máximo de notificações por hora por policy. Excedentes são enfileirados.
groupBy[]string[namespace, resourceName]Campos usados para agrupar notificações. Notificações do mesmo grupo são consolidadas.
Dedup key = hash(policy_name + rule_name + groupBy_values + severity)

Exemplo com groupBy=[namespace, resourceName, severity]:
  key = hash("production-alerts" + "critical-incidents" + "production" + "api-gateway" + "critical")
Definir maxPerHour muito baixo (ex: 5) pode suprimir alertas criticos. Use valores >= 30 para policies que cobrem severidades critical e high. O throttle nunca bloqueia a primeira notificação de um novo incidente.

Canais de Notificação

1. Slack

Envia notificações via Slack Incoming Webhooks usando Block Kit para rich formatting.
CampoTipoObrigatórioDescrição
webhook_urlstringSimURL do Incoming Webhook do Slack
channelstringNãoOverride do canal (requer webhook com permissao)
mentionstringNãoMencao (@user, @here, @channel, @oncall-group)
usernamestringNãoNome do bot (padrão: ChatCLI AIOps)
icon_emojistringNãoEmoji do bot (padrão: :robot_face:)
Cores por severidade no Block Kit:
SeveridadeCor (hex)Visual
Critical#E74C3CVermelho intenso
High#E67E22Laranja
Medium#F1C40FAmarelo
Low#2ECC71Verde
Payload Block Kit enviado:
{
  "channel": "#incidents-critical",
  "username": "ChatCLI AIOps",
  "icon_emoji": ":robot_face:",
  "blocks": [
    {
      "type": "header",
      "text": {
        "type": "plain_text",
        "text": "CRITICAL: OOMKilled on api-gateway"
      }
    },
    {
      "type": "section",
      "fields": [
        {"type": "mrkdwn", "text": "*Namespace:*\nproduction"},
        {"type": "mrkdwn", "text": "*Resource:*\nDeployment/api-gateway"},
        {"type": "mrkdwn", "text": "*Signal:*\noom_kill"},
        {"type": "mrkdwn", "text": "*Risk Score:*\n85/100"},
        {"type": "mrkdwn", "text": "*State:*\nDetected"},
        {"type": "mrkdwn", "text": "*Confidence:*\n0.92"}
      ]
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*Analysis:*\nMemory limit (512Mi) insufficient for current workload..."
      }
    },
    {
      "type": "context",
      "elements": [
        {"type": "mrkdwn", "text": "Issue: `api-gateway-oom-kill-1771276354` | <https://grafana.company.com/d/aiops|Dashboard>"}
      ]
    }
  ],
  "attachments": [{"color": "#E74C3C"}]
}
Exemplo minimo:
channels:
  - type: slack
    config:
      webhook_url: "https://hooks.slack.com/services/T00/B00/xxxxx"

2. PagerDuty

Integra com PagerDuty via Events API v2 para gerenciamento de incidentes on-call.
CampoTipoObrigatórioDescrição
routing_keystringSimIntegration Key do servico PagerDuty (Events API v2)
severity_mappingmapNãoMapeamento de severidades ChatCLI para PagerDuty
dedup_key_templatestringNãoTemplate para dedup_key (padrão: {{.IssueName}})
custom_detailsmapNãoCampos extras no payload
Mapeamento de severidades padrão:
ChatCLIPagerDutyComportamento
criticalcriticalAciona on-call imediatamente
higherrorAlta prioridade
mediumwarningPrioridade moderada
lowinfoInformativo
Deduplicacao:O dedup_key garante que atualizações de um mesmo incidente não criem alertas duplicados no PagerDuty. O padrão usa o nome do Issue, mas pode ser customizado:
dedup_key_template: "{{.Namespace}}-{{.ResourceName}}-{{.SignalType}}"
Payload enviado (Events API v2):
{
  "routing_key": "R0xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "event_action": "trigger",
  "dedup_key": "api-gateway-oom-kill-1771276354",
  "payload": {
    "summary": "[CRITICAL] OOMKilled on production/api-gateway",
    "severity": "critical",
    "source": "chatcli-aiops",
    "component": "api-gateway",
    "group": "production",
    "class": "oom_kill",
    "custom_details": {
      "risk_score": 85,
      "confidence": 0.92,
      "analysis": "Memory limit (512Mi) insufficient...",
      "issue_name": "api-gateway-oom-kill-1771276354",
      "remediation_plan": "RestartDeployment + AdjustResources"
    }
  }
}
Resolucao automatica: Quando o Issue transiciona para Resolved, o NotificationEngine envia event_action: resolve com o mesmo dedup_key, fechando o incidente no PagerDuty automaticamente.

3. OpsGenie

Integra com OpsGenie para alertas e on-call management com prioridades P1-P4.
CampoTipoObrigatórioDescrição
api_keystringSimAPI Key do OpsGenie
api_urlstringNãoURL da API (padrão: https://api.opsgenie.com)
priority_mappingmapNãoMapeamento de severidades para prioridades
responders[]ResponderNãoTimes ou usuários responsaveis
tags[]stringNãoTags para categorizar alertas
visible_to[]ResponderNãoQuem pode ver o alerta
actions[]stringNãoAções customizadas no alerta
Mapeamento de prioridades padrão:
ChatCLIOpsGenieDescrição
criticalP1Critico - aciona on-call imediatamente
highP2Alta prioridade
mediumP3Prioridade moderada
lowP4Baixa prioridade
Responder types:
responders:
  - type: team       # Time inteiro
    name: platform-sre
  - type: user       # Usuário especifico
    username: edilson@company.com
  - type: escalation # Politica de escalacao do OpsGenie
    name: sre-escalation
  - type: schedule   # Schedule de on-call
    name: sre-oncall

4. Email

Envia notificações via SMTP com suporte a STARTTLS e templates HTML.
CampoTipoObrigatórioDescrição
smtp_hoststringSimHost do servidor SMTP
smtp_portintSimPorta SMTP (587 para STARTTLS, 465 para SSL)
fromstringSimEndereco do remetente
to[]stringSimLista de destinatarios
cc[]stringNãoCopia
bcc[]stringNãoCopia oculta
usernamestringNãoCredencial SMTP (se auth requerida)
password_secretSecretRefNãoReferência ao Secret com a senha SMTP
subject_templatestringNãoTemplate Go para o assunto
tls_skip_verifyboolNãoPular verificacao TLS (padrão: false)
html_templatestringNãoTemplate HTML customizado (Go template)
Variaveis disponíveis nos templates:
VariávelDescrição
{{.Severity}}Severidade do alerta
{{.ResourceName}}Nome do recurso K8s
{{.Namespace}}Namespace
{{.SignalType}}Tipo do sinal
{{.State}}Estado atual do Issue
{{.RiskScore}}Risk score (0-100)
{{.Analysis}}Análise da IA
{{.IssueName}}Nome do Issue CR
{{.Timestamp}}Timestamp ISO 8601
Exemplo com STARTTLS:
channels:
  - type: email
    config:
      smtp_host: smtp.company.com
      smtp_port: 587
      from: "aiops@company.com"
      to: ["sre-team@company.com", "platform-leads@company.com"]
      cc: ["vp-engineering@company.com"]
      username: "aiops@company.com"
      password_secret:
        name: smtp-credentials
        key: password
      subject_template: "[{{.Severity}}] {{.SignalType}} on {{.Namespace}}/{{.ResourceName}}"
      tls_skip_verify: false
Nunca coloque credenciais SMTP diretamente no YAML da NotificationPolicy. Use sempre password_secret apontando para um Kubernetes Secret.

5. Webhook

Envia notificações para endpoints HTTP arbitrarios com assinatura HMAC-SHA256.
CampoTipoObrigatórioDescrição
urlstringSimURL do endpoint de destino
secretstringNãoChave para assinatura HMAC-SHA256
headersmapNãoHeaders HTTP customizados
methodstringNãoMétodo HTTP (padrão: POST)
timeoutdurationNãoTimeout da requisicao (padrão: 10s)
retry_countintNãoNúmero de retries em caso de falha (padrão: 3)
retry_intervaldurationNãoIntervalo entre retries (padrão: 5s)
Assinatura HMAC-SHA256:Quando secret e definido, toda requisicao inclui o header X-ChatCLI-Signature com a assinatura HMAC-SHA256 do body:
X-ChatCLI-Signature: sha256=<hex(HMAC-SHA256(secret, body))>
Validacao no receptor:
import hmac, hashlib

def verify_signature(payload: bytes, signature: str, secret: str) -> bool:
    expected = hmac.new(
        secret.encode(), payload, hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(f"sha256={expected}", signature)
Payload JSON enviado:
{
  "event_type": "issue.state_changed",
  "timestamp": "2026-03-19T14:30:00Z",
  "issue": {
    "name": "api-gateway-oom-kill-1771276354",
    "namespace": "production",
    "severity": "critical",
    "state": "Detected",
    "signal_type": "oom_kill",
    "risk_score": 85,
    "resource": {
      "kind": "Deployment",
      "name": "api-gateway"
    }
  },
  "analysis": {
    "text": "Memory limit (512Mi) insufficient...",
    "confidence": 0.92,
    "recommendations": ["Increase memory limit to 1Gi"]
  },
  "remediation": {
    "plan_name": "api-gateway-oom-kill-plan-1",
    "actions": ["RestartDeployment", "AdjustResources"]
  }
}

6. Microsoft Teams

Envia notificações para canais do Microsoft Teams via Adaptive Cards e Incoming Webhooks.
CampoTipoObrigatórioDescrição
webhook_urlstringSimURL do Incoming Webhook do Teams
title_templatestringNãoTemplate para o titulo do card
theme_colorstringNãoCor do tema (hex, sem #)
Adaptive Card gerado:O NotificationEngine monta um Adaptive Card com secoes de:
  • Header com severidade colorida
  • Detalhes do recurso (namespace, kind, name)
  • Análise da IA (se disponivel)
  • Ações sugeridas
  • Link para o dashboard Grafana
Cores por severidade no card:
Severidadetheme_color
CriticalE74C3C
HighE67E22
MediumF1C40F
Low2ECC71

EscalationPolicy CRD

A EscalationPolicy define a cadeia de escalacao automática quando um alerta não e reconhecido (acknowledged) dentro do timeout definido.
apiVersion: platform.chatcli.io/v1alpha1
kind: EscalationPolicy
metadata:
  name: production-escalation
  namespace: production
spec:
  match:
    severities: [critical, high]
    namespaces: [production, payments]
  levels:
    - name: L1 - On-Call SRE
      timeout: "5m"
      targets:
        - type: channel
          channel:
            type: slack
            config:
              webhook_url: "https://hooks.slack.com/services/T00/B00/l1-hook"
              channel: "#sre-oncall"
              mention: "@oncall-sre"
        - type: channel
          channel:
            type: pagerduty
            config:
              routing_key: "R0-l1-routing-key"

    - name: L2 - SRE Lead + Platform Team
      timeout: "15m"
      targets:
        - type: user
          user: "sre-lead@company.com"
        - type: team
          team: "platform-engineering"
        - type: channel
          channel:
            type: opsgenie
            config:
              api_key: "xxxxxxxx"
              priority_mapping:
                critical: P1
                high: P1

    - name: L3 - VP Engineering + Incident Commander
      timeout: "30m"
      targets:
        - type: user
          user: "vp-eng@company.com"
        - type: oncall
          oncall:
            schedule: "incident-commander"
            provider: opsgenie
        - type: channel
          channel:
            type: email
            config:
              smtp_host: smtp.company.com
              smtp_port: 587
              from: "aiops-critical@company.com"
              to: ["exec-team@company.com"]

  repeatInterval: "30m"
  maxRepeats: 3

Campos do Spec

CampoTipoObrigatórioDescrição
matchEscalationMatchSimCriterios para aplicar está escalacao
levels[]EscalationLevelSimCadeia ordenada de níveis de escalacao
repeatIntervaldurationNãoIntervalo para repetir o ultimo nível (padrão: 30m)
maxRepeatsintNãoMáximo de repeticoes do ultimo nível (padrão: 3)

EscalationLevel

CampoTipoObrigatórioDescrição
namestringSimNome descritivo do nível
timeoutdurationSimTempo sem acknowledgement antes de escalar para o próximo nível
targets[]EscalationTargetSimDestinos da notificação neste nível

EscalationTarget

CampoTipoDescrição
typestringchannel, user, team, oncall
channelChannelConfigConfiguração do canal (quando type=channel)
userstringEmail do usuário (quando type=user)
teamstringNome do time (quando type=team)
oncallOnCallRefReferência ao schedule de on-call (quando type=oncall)

Como a Escalacao Funciona

Tracking via annotations: O EscalationPolicy reconciler rastreia o estado da escalacao usando annotations no Issue CR:
AnnotationDescrição
platform.chatcli.io/escalation-levelNível atual (0=L1, 1=L2, 2=L3)
platform.chatcli.io/escalation-started-atTimestamp do início da escalacao
platform.chatcli.io/escalation-acknowledgedtrue quando reconhecido
platform.chatcli.io/escalation-acknowledged-byQuem reconheceu
platform.chatcli.io/escalation-repeat-countContagem de repeticoes do ultimo nível
Acknowledgement: Para parar a cadeia de escalacao, o on-call deve reconhecer o alerta:
kubectl annotate issue api-gateway-oom-kill-1771276354 \
  platform.chatcli.io/escalation-acknowledged=true \
  platform.chatcli.io/escalation-acknowledged-by=edilson
Ou via PagerDuty/OpsGenie (o webhook de retorno atualiza a annotation automaticamente).

Exemplos Completos

Politica de Notificação: Slack + PagerDuty

apiVersion: platform.chatcli.io/v1alpha1
kind: NotificationPolicy
metadata:
  name: critical-alerts-multi-channel
  namespace: production
spec:
  rules:
    - name: critical-to-slack-and-pagerduty
      match:
        severities: [critical]
        states: [Detected, Escalated]
      channels:
        - type: slack
          config:
            webhook_url: "https://hooks.slack.com/services/T00/B00/critical-hook"
            channel: "#p0-incidents"
            mention: "@here"
        - type: pagerduty
          config:
            routing_key: "R0-critical-routing-key"
            severity_mapping:
              critical: critical

    - name: high-to-slack
      match:
        severities: [high]
        states: [Detected, Remediating, Escalated]
      channels:
        - type: slack
          config:
            webhook_url: "https://hooks.slack.com/services/T00/B00/high-hook"
            channel: "#incidents"

    - name: resolved-to-slack
      match:
        states: [Resolved]
      channels:
        - type: slack
          config:
            webhook_url: "https://hooks.slack.com/services/T00/B00/resolved-hook"
            channel: "#incidents"

  throttle:
    deduplicationWindow: "3m"
    maxPerHour: 100
    groupBy: [namespace, resourceName]

Politica de Escalacao L1 -> L2 -> L3

apiVersion: platform.chatcli.io/v1alpha1
kind: EscalationPolicy
metadata:
  name: p0-escalation
  namespace: production
spec:
  match:
    severities: [critical]
  levels:
    - name: L1 - Primary On-Call
      timeout: "5m"
      targets:
        - type: channel
          channel:
            type: pagerduty
            config:
              routing_key: "R0-primary-oncall"
        - type: channel
          channel:
            type: slack
            config:
              webhook_url: "https://hooks.slack.com/services/T00/B00/oncall"
              channel: "#sre-oncall"
              mention: "@oncall-primary"

    - name: L2 - Secondary On-Call + SRE Manager
      timeout: "10m"
      targets:
        - type: oncall
          oncall:
            schedule: "secondary-oncall"
            provider: pagerduty
        - type: user
          user: "sre-manager@company.com"
        - type: channel
          channel:
            type: opsgenie
            config:
              api_key: "xxx"
              priority_mapping:
                critical: P1

    - name: L3 - Engineering Leadership
      timeout: "20m"
      targets:
        - type: team
          team: engineering-leadership
        - type: channel
          channel:
            type: email
            config:
              smtp_host: smtp.company.com
              smtp_port: 587
              from: "aiops-escalation@company.com"
              to: ["cto@company.com", "vp-eng@company.com"]
              subject_template: "[P0 ESCALATED] {{.ResourceName}} - {{.SignalType}} não resolvido"

  repeatInterval: "15m"
  maxRepeats: 5

Email para SLA Breaches

apiVersion: platform.chatcli.io/v1alpha1
kind: NotificationPolicy
metadata:
  name: sla-breach-notifications
  namespace: production
spec:
  rules:
    - name: sla-violation-email
      match:
        severities: [critical, high]
        signalTypes: [sla_violation]
      channels:
        - type: email
          config:
            smtp_host: smtp.company.com
            smtp_port: 587
            from: "sla-alerts@company.com"
            to:
              - "sre-team@company.com"
              - "service-owners@company.com"
            cc:
              - "vp-eng@company.com"
            username: "sla-alerts@company.com"
            password_secret:
              name: smtp-credentials
              key: password
            subject_template: "[SLA BREACH] {{.Severity}} - {{.Namespace}}/{{.ResourceName}} exceeds SLA"
            tls_skip_verify: false
        - type: slack
          config:
            webhook_url: "https://hooks.slack.com/services/T00/B00/sla-hook"
            channel: "#sla-violations"
            mention: "@service-owners"

  throttle:
    deduplicationWindow: "30m"
    maxPerHour: 20
    groupBy: [namespace, resourceName]

Troubleshooting

Checklist de diagnostico:
  1. Verifique se a NotificationPolicy existe no namespace correto:
kubectl get notificationpolicies -A
  1. Verifique os logs do operator para erros de dispatch:
kubectl logs -l app=chatcli-operator -n chatcli-system | grep "notification"
  1. Confirme que o matching está correto:
kubectl get issues -n production -o yaml | grep -A5 "severity\|state\|signalType"
  1. Verifique se o throttle não está suprimindo:
kubectl logs -l app=chatcli-operator -n chatcli-system | grep "throttled\|deduplicated"
  • Confirme que o webhook_url está correto e o app Slack está instalado no workspace
  • Verifique se o canal existe e o bot tem permissao de postar
  • Teste o webhook manualmente:
curl -X POST -H 'Content-type: application/json' \
  --data '{"text":"Teste ChatCLI AIOps"}' \
  "https://hooks.slack.com/services/T00/B00/xxxxx"
  • Confirme que o routing_key e uma Integration Key (não API Key)
  • Verifique se o servico no PagerDuty está ativo
  • Valide o payload no PagerDuty Event Debugger
  • Confirme que o evento não está sendo deduplicado pelo dedup_key
  • Verifique conectividade SMTP:
kubectl exec -it deploy/chatcli-operator -n chatcli-system -- \
  nc -zv smtp.company.com 587
  • Confirme credenciais no Secret referenciado em password_secret
  • Verifique se tls_skip_verify: false e o certificado do servidor e valido
  • Cheque a pasta de spam dos destinatarios
  • Verifique annotations do Issue:
kubectl get issue &lt;nome&gt; -o yaml | grep "escalation"
  • Confirme que escalation-acknowledged não está setado como true
  • Verifique os logs do EscalationPolicy reconciler
  • Confirme que o timeout do nível não e maior que o tempo desde a criacao
  • Confirme que o secret na policy e o mesmo usado no receptor para verificacao
  • Verifique se o receptor está lendo o body raw antes de parsear JSON
  • Use hmac.compare_digest (ou equivalente) para evitar timing attacks

Prometheus Metrics

O sistema de notificações expoe metricas para observabilidade completa:
MetricaTipoLabelsDescrição
chatcli_notifications_sent_totalCounterchannel, severity, rule, namespaceTotal de notificações enviadas com sucesso
chatcli_notifications_failed_totalCounterchannel, severity, rule, error_typeTotal de notificações que falharam
chatcli_notifications_throttled_totalCounterrule, reasonNotificações suprimidas por throttle ou dedup
chatcli_notification_dispatch_duration_secondsHistogramchannelLatencia do envio por canal
chatcli_escalation_level_reachedGaugepolicy, namespaceNível de escalacao atual por policy
chatcli_escalation_acknowledged_totalCounterpolicy, levelTotal de escalações reconhecidas por nível
chatcli_escalation_timeout_totalCounterpolicy, levelTotal de timeouts de escalacao por nível
Alertas Prometheus recomendados:
groups:
  - name: chatcli-notifications
    rules:
      - alert: NotificationChannelFailing
        expr: rate(chatcli_notifications_failed_total[5m]) > 0.1
        for: 5m
        labels:
          severity: warning
        annotations:
          summary: "Canal de notificação {{ $labels.channel }} com falhas"
          description: "Taxa de falha > 0.1/s nos ultimos 5 minutos"

      - alert: EscalationReachedL3
        expr: chatcli_escalation_level_reached >= 2
        for: 1m
        labels:
          severity: critical
        annotations:
          summary: "Escalacao atingiu L3 para policy {{ $labels.policy }}"
          description: "Incidente não reconhecido atingiu o ultimo nível de escalacao"

      - alert: HighThrottleRate
        expr: rate(chatcli_notifications_throttled_total[10m]) > 1
        for: 10m
        labels:
          severity: warning
        annotations:
          summary: "Alta taxa de throttling na rule {{ $labels.rule }}"

Próximo Passo

SLOs e SLAs

Gestao de Service Level Objectives com burn rate alerting

Workflow de Aprovação

Controle de mudancas com approval policies e blast radius

AIOps Platform

Deep-dive na arquitetura AIOps

K8s Operator

Configuração e CRDs do operator