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

【功能建议】短时间内产生大量报错时不发送错误告警 #3

Open
ab-Royo opened this issue Sep 3, 2023 · 4 comments

Comments

@ab-Royo
Copy link

ab-Royo commented Sep 3, 2023

在机器人上添加了插件 HarukaBot ,然后因为 HarukaBot 的bug导致出现错误日志,每秒钟约3-5条

08-23 15:47:18 [ERROR] haruka_bot | 爬取动态失败-352 -352
08-23 15:47:19 [ERROR] haruka_bot | 爬取动态失败-352 -352
08-23 15:47:19 [ERROR] haruka_bot | 爬取动态失败-352 -352
08-23 15:47:19 [ERROR] haruka_bot | 爬取动态失败-352 -352
08-23 15:47:20 [ERROR] haruka_bot | 爬取动态失败-352 -352
08-23 15:47:20 [ERROR] haruka_bot | 爬取动态失败-352 -352
08-23 15:47:20 [ERROR] haruka_bot | 爬取动态失败-352 -352
08-23 15:47:20 [ERROR] haruka_bot | 爬取动态失败-352 -352
08-23 15:47:20 [ERROR] haruka_bot | 爬取动态失败-352 -352
...

使用本插件的订阅错误告警功能。在整点时,机器人开始不断发送大量有关此错误的合并转发消息,虽然已经在最快速度登上服务器关闭机器人,但还是在一分钟左右发出了近百条消息喜提腾讯风控

希望可以新增功能:
在 指定分钟 内收到超过 设定条数 错误信息之后,超过 设定条数 的消息就不在QQ中发送错误告警直到机器人重启,防止因为发送大量消息导致风控

@ssttkkl
Copy link
Contributor

ssttkkl commented Sep 3, 2023

我感觉是不是该反省下为什么会打这么多error(

可以考虑加一个忽略插件的功能

@ab-Royo
Copy link
Author

ab-Royo commented Sep 3, 2023

使用HarukaBot来爬取B站动态,但是因为B站修改了接口的参数导致出现了问题,然后就请求一次就报错一次就变成这样了,只能说防不胜防啊😭

@ssttkkl
Copy link
Contributor

ssttkkl commented Sep 3, 2023

我意思是log level不规范,亲人两行泪(
不过这本来是用来监控我自己的插件报错用的,别人的插件也管不着,加上按插件过滤应该比较合适

@ab-Royo
Copy link
Author

ab-Royo commented Sep 3, 2023

好的,大佬加油!

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

No branches or pull requests

2 participants