Closed stefkkkk closed 1 year ago
Was fixed by the next refactor, due to huge labels overfllowing and merging all in one field "description" in discord JSON body:
route:
group_by:
- alertname
group_wait: 1m
group_interval: 1m
repeat_interval: 10m
receiver: discord
receivers:
2. Alerts
How it become visible is on attached screenshot
So main issue is not a good default alertmanager's template
For debugging also will be useful to use this site: https://webhook.site/ If you will see such errors like mine, simply replace discord's webhook to webhook url on those site
Hello @stefkkkk ,
I applied the same solution to address the issue with Discord and received the alert. However, for the resolved alert, metadata is not displayed on the channel.
[FIRING:1] CPUThrottlingHigh Summary: 30.62% throttling of CPU in the namespace default for container container-name in the pod pod-name.
[RESOLVED] CPUThrottlingHigh
Can you help me here ?
Hello @stefkkkk ,
I applied the same solution to address the issue with Discord and received the alert. However, for the resolved alert, metadata is not displayed on the channel.
[FIRING:1] CPUThrottlingHigh Summary: 30.62% throttling of CPU in the namespace default for container container-name in the pod pod-name.
[RESOLVED] CPUThrottlingHigh
Can you help me here ?
I have the same thing, in my case I don't care about this
Okey @stefkkkk . Do we have workaround to get that as well ?
Okey @stefkkkk . Do we have workaround to get that as well ?
No, I don't
@stefkkkk My issue got resolved by this https://github.com/prometheus/alertmanager/pull/3597.
Thanks.
What did you do? Trying to setup alerts into discord chat, using prometheus metric from nginx ingress controller:
What did you expect to see? Expected to see alerts in format like any other alerts already set up:
What did you see instead? Under which circumstances? Instead I see in alertmanager logs an error:
ts=2023-08-15T17:50:14.274Z caller=dispatch.go:352 level=error component=dispatcher msg="Notify for alerts failed" num_alerts=3 err="discord/discord[0]: notify retry canceled due to unrecoverable error after 1 attempts: unexpected status code 400: {\"embeds\": [\"0\"]}"
At least now it reproduced only for nginx ingress contoller metric, for example for metrics from black-box exporter or node-exporter works fine EnvironmentAlertmanager version:
image: prom/alertmanager:v0.25.0
Alertmanager configuration file:
receivers:
name: discord discord_configs:
Logs:
Also I attached templated alert which I see and which is firing normally, but something happened exactly during sending alert into discord API