You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zh...@apache.org on 2022/03/27 12:13:26 UTC
[dolphinscheduler-website] branch master updated: [Fix] [Website-9173]declare JSON body feature to the telegram.md (#750)
This is an automated email from the ASF dual-hosted git repository.
zhongjiajie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git
The following commit(s) were added to refs/heads/master by this push:
new 1d1242e [Fix] [Website-9173]declare JSON body feature to the telegram.md (#750)
1d1242e is described below
commit 1d1242ec1c9807506019c836fcd3a376a93b8b54
Author: Tq <ti...@gmail.com>
AuthorDate: Sun Mar 27 20:13:19 2022 +0800
[Fix] [Website-9173]declare JSON body feature to the telegram.md (#750)
add JSON body feature to the telegram.md
Co-authored-by: Jiajie Zhong <zh...@gmail.com>
---
docs/en-us/dev/user_doc/guide/alert/telegram.md | 9 +++++++++
docs/zh-cn/dev/user_doc/guide/alert/telegram.md | 8 ++++++++
2 files changed, 17 insertions(+)
diff --git a/docs/en-us/dev/user_doc/guide/alert/telegram.md b/docs/en-us/dev/user_doc/guide/alert/telegram.md
index 674b125..203ab4f 100644
--- a/docs/en-us/dev/user_doc/guide/alert/telegram.md
+++ b/docs/en-us/dev/user_doc/guide/alert/telegram.md
@@ -26,6 +26,15 @@ The following shows the `Telegram` configuration example:
* Password
> Authentication(Password) for the proxy server
+**NOTICE**:The webhook needs to be able to receive and use the same JSON body of HTTP POST that DolphinScheduler constructs and the following shows the JSON body:
+
+```json
+{
+ "text": "[{\"projectId\":1,\"projectName\":\"p1\",\"owner\":\"admin\",\"processId\":35,\"processDefinitionCode\":4928367293568,\"processName\":\"s11-3-20220324084708668\",\"taskCode\":4928359068928,\"taskName\":\"s1\",\"taskType\":\"SHELL\",\"taskState\":\"FAILURE\",\"taskStartTime\":\"2022-03-24 08:47:08\",\"taskEndTime\":\"2022-03-24 08:47:09\",\"taskHost\":\"192.168.1.103:1234\",\"logPath\":\"\"}]",
+ "chat_id": "chat id number"
+}
+```
+
References:
- [Telegram Application Bot Guide](https://core.telegram.org/bots)
- [Telegram Bots Api](https://core.telegram.org/bots/api)
diff --git a/docs/zh-cn/dev/user_doc/guide/alert/telegram.md b/docs/zh-cn/dev/user_doc/guide/alert/telegram.md
index c631915..3cc750f 100644
--- a/docs/zh-cn/dev/user_doc/guide/alert/telegram.md
+++ b/docs/zh-cn/dev/user_doc/guide/alert/telegram.md
@@ -26,6 +26,14 @@
* Password
> 代理鉴权密码
+**注意**:用户配置的WebHook需要能够接收和使用与DolphinScheduler构造的HTTP POST请求BODY相同的结构,JSON结构如下:
+
+```json
+{
+ "text": "[{\"projectId\":1,\"projectName\":\"p1\",\"owner\":\"admin\",\"processId\":35,\"processDefinitionCode\":4928367293568,\"processName\":\"s11-3-20220324084708668\",\"taskCode\":4928359068928,\"taskName\":\"s1\",\"taskType\":\"SHELL\",\"taskState\":\"FAILURE\",\"taskStartTime\":\"2022-03-24 08:47:08\",\"taskEndTime\":\"2022-03-24 08:47:09\",\"taskHost\":\"192.168.1.103:1234\",\"logPath\":\"\"}]",
+ "chat_id": "chat id number"
+}
+```
[Telegram 如何申请机器人,如何创建频道](https://core.telegram.org/bots)
[Telegram 机器人开发文档](https://core.telegram.org/bots/api)