duplicate 
https://groups.google.com/g/prometheus-users/c/44ags3VtBfA/m/xc10mQn1AQAJ

среда, 16 февраля 2022 г. в 18:29:41 UTC+3, Valery Evdokimov: 

> 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/1b5ec9e3-805b-4a8e-890c-e26f619f860dn%40googlegroups.com.

Reply via email to