Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 添加Telegram Bot通知支持 #1295

Merged
merged 2 commits into from
Nov 30, 2022
Merged

feat: 添加Telegram Bot通知支持 #1295

merged 2 commits into from
Nov 30, 2022

Conversation

Mystery00
Copy link
Contributor

What type of PR is this?
告警通知功能增强
What this PR does / why we need it:

增加了Telegram Bot通知的内置支持,具体的通知模板参考自企业微信机器人

Which issue(s) this PR fixes:

Fixes #345

Special notes for your reviewer:

使用时,在用户的更多联系方式中,增加 telegram_robot_token 的配置项,值格式为 ”botToken/chatId“ ,也可以直接填入整个url链接,例如 ”https://api.telegram.org/botxxxx:xxxxxxxx/sendMessage?chat_id=123456“ ,支持url链接意味着使用方可以通过指定的自定义域名正向代理telegram官方api域名,从而达到国内正常使用的目的

我已经通过企业微信Bot的相关逻辑大概找了一些需要修改的地方,可能会有部分遗漏

@Mystery00
Copy link
Contributor Author

目前从企微bot拷贝的模板是Markdown的,所以代码中写死了ParseMode为markdown,后期如果有需要可以扩展支持HTML

@710leo 710leo merged commit ddc86f2 into ccfos:main Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

期待告警通道,增加telegram robot支持
2 participants