Alerting: Support WeCom as a contact point type (#40975)

* add wecom notifier

* fix backend lint

* fix alerting channel test

* update wecom doc

* update notifiers

* update wecom notifier test

* Apply suggestions from code review

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* unify wecom alerting

* fix backend lint

* fix front lint

* fix wecom test

* update docs

* Update pkg/services/ngalert/notifier/channels/wecom.go

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* Update docs/sources/alerting/old-alerting/notifications.md

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* Update docs/sources/alerting/old-alerting/notifications.md

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* Update docs/sources/alerting/old-alerting/notifications.md

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* remove old wecom notifier

* remove old notifier doc

* fix backend test

* Update docs/sources/alerting/unified-alerting/contact-points.md

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* fix doc style

Co-authored-by: gotjosh <josue.abreu@gmail.com>
This commit is contained in:
smallpath
2021-12-16 00:42:03 +08:00
committed by GitHub
parent f16696a069
commit aec14cba42
6 changed files with 299 additions and 0 deletions

View File

@@ -1294,6 +1294,47 @@ var expAvailableChannelJsonOutput = `
}
]
},
{
"type": "wecom",
"name": "WeCom",
"heading": "WeCom settings",
"description": "Send alerts generated by Grafana to WeCom",
"info": "",
"options": [
{
"element": "input",
"inputType": "text",
"label": "Url",
"description": "",
"placeholder": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx",
"propertyName": "url",
"selectOptions": null,
"showWhen": {
"field": "",
"is": ""
},
"required": true,
"validationRule": "",
"secure": true
},
{
"element": "textarea",
"inputType": "",
"label": "Message",
"description": "Custom WeCom message. You can use template variables.",
"placeholder": "{{ template \"default.message\" . }}",
"propertyName": "message",
"selectOptions": null,
"showWhen": {
"field": "",
"is": ""
},
"required": false,
"validationRule": "",
"secure": false
}
]
},
{
"type": "prometheus-alertmanager",
"name": "Alertmanager",