Closed s4kharitonov closed 5 years ago
I didn't encounter the first issue. I'm afraid it was something related to incoming webhook bot. could you plz try to build another imcoming webook? if it still happens, you could relay your alertmanager alerts to http://webhook.site/ and paste request detail for trouble shooting.
As for second issue, could you paste the link address after clicking? I use prometheus version of 2.7.2 , it's fine, what's your prometheus version?
prometheus version
prometheus, version 2.12.0 (branch: HEAD, revision: 43acd0e2e93f9f70c49b2267efa0124f1e759e86)
build user: root@7a9dbdbe0cc7
build date: 20190818-13:53:16
go version: go1.12.8
alertmanager version
alertmanager, version 0.19.0 (branch: HEAD, revision: 7aa5d19fea3f58e3d27dbdeb0f2883037168914a)
build user: root@587d0268f963
build date: 20190903-15:01:40
go version: go1.12.8
link after clicked in zoom chat
http://domain:9090/graph?g0.expr=haproxy_backend_up+%253D%253D+0&g0.tab=1
link after clicked in alertmanager source button
http://domain:9090/graph?g0.range_input=1h&g0.expr=haproxy_backend_up%20%3D%3D%200&g0.tab=1
"%253D%253D" is not valid encoded URL, could you plz provide raw alert request detail through webhook.site so that i could reproduce the issue?
If send to webhook.site link work correct
{
"head": {
"text": "Alert Status: FIRING",
"style": {
"color": "#FF0000",
"bold": true,
"italic": false
}
},
"body": [
{
"type": "message",
"text": "Instance: ip:22,Job: SSH",
"style": {
"color": "#666",
"bold": false,
"italic": false
}
},
{
"type": "message",
"text": "[1] 2019-10-28T10:51:09.439Z SSH Critical",
"style": {
"color": "#222222",
"bold": true,
"italic": false
}
},
{
"type": "message",
"text": "Description: ip:22 | TCP: Failed SSH check",
"style": {
"color": "#443333",
"bold": false,
"italic": false
}
},
{
"type": "message",
"text": "Click here to view detail metrics",
"link": "http://domain:9090/graph?g0.expr=probe_success%7Bjob%3D%22SSH%22%7D+%3D%3D+0&g0.tab=1"
},
{
"type": "message",
"text": "Click here to see all alerts",
"link": "http://domain:9093"
},
{
"type": "message",
"text": "Click here to open grafana",
"link": "http://domain:3000"
}
]
}
webhook.site
http://domain:9090/graph?g0.expr=probe_success%7Bjob%3D%22SSH%22%7D+%3D%3D+0&g0.tab=1
zoom
http://domain:9090/graph?g0.expr=probe_success%257Bjob%253D%2522SSH%2522%257D+%253D%253D+0&g0.tab=1
alertmanager source
http://domain:9090/graph?g0.expr=probe_success%7Bjob%3D%22SSH%22%7D+%3D%3D+0&g0.tab=1
Sent test alert with correct url, after click on link url is incorrect
curl -X POST http://domain:9093/api/v1/alerts \
-H 'Content-Type: application/json' \
-d '[{
"labels": {
"alertname": "Test",
"service": "Service",
"severity": "critical",
"instance": "10.10.10.12"
},
"annotations": {
"summary": "Test service is down!"
},
"generatorURL": "http://domain:9090/graph?g0.expr=probe_success%7Bjob%3D%22SSH%22%7D+%3D%3D+0&g0.tab=1"
}]'
After clicked
http://domain:9090/graph?g0.expr=probe_success%257Bjob%253D%2522SSH%2522%257D+%253D%253D+0&g0.tab=1
Also tried change channel, generated new zoom webhook url and token, no luck, still the same problem
It's wired. I will try to reproduce locally...
@Code2Life Any update for this? Can you add decodeURI for alert.generatorURL? It should solve problem with link
@s4kharitonov I'll add this tomorrow
I coundn't reproduce the issue with same prometheus/alertmanager version. Adding decodeURI causes 400 Bad Request from Zoom side. What's your ZOOM client version? Could you please upgrade your Zoom Client to latest version and retry ?
I tried to update zoom client, it didn't solve the problem. In any case, I no longer have any ideas why this is not working correctly for me. In this case, I simply will not display this link, thanks for the help.
You are welcome, and thanks for discovering issues. but this issue is wired and I could not reproduce. I'll contact Zoom Integration team to make an alertmanager native integration app, without extra deployment. It may cause some time, will update this repo when they publish the app in marketplace
Hello, I noticed that several messages not received to zoom. At one moment, 4 warnings worked for me, 3 messages came in zoom and one was lost. After a thorough check of the logs, I see that this happens periodically.
docker logs:
Also it seems to me that link "Click here to view detail metrics" work incorrectly. After click on it, I got this error: Error executing query: invalid parameter 'query' and full query look:
Must be
Could you check it when you have spare time. Thanks in advance.