dolphinscheduler
dolphinscheduler copied to clipboard
[Feature-14839][Alert]Add Webhook Alert Plugin to support Enterprise WeChat notifications by robot
Add Webhook Alert Plugin to support Enterprise WeChat notifications by robot close #14839
Purpose of the pull request
The purpose of this PR is to support Enterprise WeChat notifications by robot. This pull request adds webhook alert plugin.
Brief change log
- Add dolphinscheduler-alert-webhook to the module dolphinscheduler-alert-plugins.
- Add classes on which alarms rely, including WebHookSender, WebHookAlertChannel, WebHookAlertChannelFactory, WebHookAlertConstants, and WebHookAlertMessage.
- Modify the pom.xml file of the dolphinscheduler alert plugins module.
- Add pom.xml file for dolphinscheduler alert webhook module and introduce corresponding dependencies
- Write test classes and methods required for message sending.
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md
Hi @ahuljh Please add the documents of this new feature.
Hi @ahuljh Please add the documents of this new feature.
Thank you for your reminder. I will supplement the guidance document, verify the code is correct, and then upload it again. After all have been uploaded, I will remind you to check again. Thanks.
Hi @ahuljh Please add the documents of this new feature.
Hi @caishunfeng The documents and code have been supplemented and verified. Could you please continue with the merge process? Thanks.
About this feature, we already have http
and wechat
plugin, this webhook looks like another way to use wechat by HTTP. How about we modify HTTP plugin and add a simple way to use HTTP, the same as just a HTTP URL or we modify wechat plugin to support this way?
And wechat webhook can @ someone, maybe we modify wechat plugin is better
And wechat webhook can @ someone, maybe we modify wechat plugin is better
In fact, we conducted an evaluation before adding the webhook plugin, and if we add the webhook method to the wechat plugin, the Secret and CropId options will be redundant and cannot be adapted based on this. If using the Http plugin, it is necessary to modify the source code of the Http plugin, which will affect the use of other alerts through HTTP. After a comprehensive decision, we have decided to add the Webhook method. This is also the cheapest way.
Hi, @qingwli I will consider adding options for @ everyone and @ designated person. If additional options are needed, I will resubmit the Pull Request. In addition, the goal of this webhook plugin is to adapt to various platforms, not just enterprise WeChat. This plugin will adapt to various other places that require alerting through webhook. Thank you for your suggestion.
About Wechat plugin, we add a send type webhook and add an input field, let the Secret and CropId options not required is a good way? We can support two WeChat way and adapt pervious way
About Wechat plugin, we add a send type webhook and add an input field, let the Secret and CropId options not required is a good way? We can support two WeChat way and adapt pervious way
By modifying WeChat plugins, you can also meet your desired needs for WeChat. But is it no longer supported for other places that require inputting webhooks. Through webhook plugin, it can be flexibly applied to other places, rather than just WeChat.
About webhook plugin can support different webhook request, but like wechat have @ function, the field is not common in different webhook request, so it's different to be a common plugin if you add some config. If do that it's similar to HTTP plugin.
In my opinion, for ds we support so many plugins, and for any alert ways always have different request combinations, The root way is HTTP too, we just support usage way for easy use. And for user side, If I want to use wechat , I always click Wechat button not webhook. So I think we should enhance wechat plugin.
Hi, @caishunfeng @zhongjiajie @EricGao888 My company has already used this method, and many people have this need. Do you think it is necessary to add webhook plugins to adapt to different platforms? Or is it to modify the WeChat plugin to only meet the needs of WeChat?
cc @SbloodyS
It's better to rename it to WeChat-webhook, rather than webhook. Not all webhooks can support markdown.
It's better to rename it to WeChat-webhook, rather than webhook. Not all webhooks can support markdown.
Yes, your opinion is very good. I will rename the plugin this week.
Expect my code to be quickly merged
@caishunfeng @ruanwenjun plz run CI
还没有合并吗?