AlertManager donot send alert to webhook #700
Unanswered
luca-amato
asked this question in
Q&A
Replies: 1 comment
-
I found the problem.
one for each webhook destination that you need to manage I suggest to insert some alertmanager.yml example in the github in order to solve some alertmanager configuration misleading here is my correct yml lobal:
Bye |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I try to use webhook in my env.
I install webhook in a pod and I run it using
webhook -hooks hooks.json -verbose
I show some messages at runtime and at the end it shows the following message
[webhook] 2024/10/03 15:48:45 os signal watcher ready
So I test the network connection using curl using
curl http://ubuntu.mon.svc.cluster.local:9000/hooks/redeploy-webhook
in webhook I see the answer
[webhook] 2024/10/03 16:21:08 [7d2780] incoming HTTP GET request from 10.128.8.1:15211
[webhook] 2024/10/03 16:21:08 [7d2780] redeploy-webhook got matched
[webhook] 2024/10/03 16:21:08 [7d2780] error parsing body payload due to unsupported content type header:
[webhook] 2024/10/03 16:21:08 [7d2780] redeploy-webhook hook triggered successfully
[webhook] 2024/10/03 16:21:08 [7d2780] 200 | 0 B | 61.612µs | ubuntu.mon.svc.cluster.local:9000 | GET /hooks/redeploy-webhook
[webhook] 2024/10/03 16:21:08 [7d2780] executing /backup/myhook.sh (/backup/myhook.sh) with arguments ["/backup/myhook.sh"] and environment [] using /backup as cwd
[webhook] 2024/10/03 16:21:08 [7d2780] command output:
[webhook] 2024/10/03 16:21:08 [7d2780] finished handling redeploy-webhook
So I configure alertManager and this is my alertmanager status:
....
match_re:
severity: critical|warning
continue: true
group_wait: 15m
group_wait: 15m
group_interval: 15m
...
webhook_configs:
http_config:
follow_redirects: true
enable_http2: true
url: http://ubuntu.mon.svc.cluster.local:9000/hooks/redeploy-webhook
max_alerts: 0
Now I fired an alert and I find it inside alertManager log
ts=2024-10-03T16:16:14.008Z caller=dispatch.go:515 level=debug component=dispatcher aggrGroup="{}:{alertname="myalert"}" msg=flushing alerts=[myalert[c4b74c5][resolved]]
ts=2024-10-03T16:25:07.739Z caller=dispatch.go:163 level=debug component=dispatcher msg="Received alert" alert=myalert[c4b74c5][active]
but in webhook I do not receive anything
can someone help me to understand why it does not work?
Many thanks in advence for any suggestion
Luca
Beta Was this translation helpful? Give feedback.
All reactions