Hi! I configure Alertmanager reiver with type Slack and get strange result. 
Sometime notification has no text body, but in alertmaager is all ok.

route config:
` routes:
   - match:
       notification: devops
     receiver: devops_notification_alertmanager
     group_by: ['...']
     repeat_interval: 24h
     continue: false`

receiver configuration:
`- name: "devops_notification_alertmanager"
  slack_configs:
  - api_url: 'https://hooks.slack.com/services/xxx'
    send_resolved: false
  - channel: 'devops_notification_alertmanager'
   title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ 
.Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
    text: >-
        {{ range .Alerts -}}
        *Alert:* {{ .Annotations.title }}{{ if .Labels.severity }} - `{{ 
.Labels.severity }}`{{ end }}
        *Details:*
          {{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
          {{ end }}
        *Description:* {{ .Annotations.description }}
        {{ end }}`

example rule (this error i see with all rules, taht example)  :
`  - alert: Kubernetes Container restart
    expr: sum(delta(kube_pod_container_status_restarts_total[10m])) by 
(cluster,container,namespace) > 0.9
    for: 10m
    labels:
      severity: warning
      alert_service: k8s 
      notification: devops
    annotations:
      summary: K8s container restart {{ $labels.container }} value {{ 
$value }} 
      description: Container {{ $labels.container }} restart > 10 for 10m`

alertmanager version - docker.io/bitnami/alertmanager:0.23.0-debian-10-r140
I thought disabling grouping would help - but it doesn't. In pod's logs saw 
only 1 msg on this event:
`level=debug ts=2022-02-16T14:26:57.330Z caller=dispatch.go:516 
component=dispatcher 
aggrGroup="{}/{notification=\"devops\"}:{alert_service=\"k8s\", 
alertname=\"Kubernetes Container restart\", cluster=\"staging\", 
container=\"`

how it looks like:
last message is ok, but first and second has no text body(scr attach)

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/94778d42-0484-42db-94ef-e089df44bc6fn%40googlegroups.com.

Reply via email to