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

关于延时的逻辑判断 #234

Open
lianyis opened this issue Oct 19, 2023 · 12 comments
Open

关于延时的逻辑判断 #234

lianyis opened this issue Oct 19, 2023 · 12 comments

Comments

@lianyis
Copy link

lianyis commented Oct 19, 2023

目前想监测服务器异常关机,并报警。请问一下,watchdog中能否实现,offline=0保持几秒,或几个检测周期再报警。因为目前会出现因为网络波动或其它状况导致中断个几秒,但服务器并没有真正异常,也会导致报警。

@cppla
Copy link
Owner

cppla commented Oct 19, 2023

下次闲了会更新这块逻辑,暂时先用username!='' 或 name!='' 屏蔽掉经常闪断掉线的告警。

@xulinbao
Copy link

下次闲了会更新这块逻辑,暂时先用username!='' 或 name!='' 屏蔽掉经常闪断掉线的告警。

老大,这个逻辑是修改哪个位置的代码,我也遇到这个问题,服务器数量比较多,用username!='' 或 name!='' 这个方法,有点不大适合

@cppla
Copy link
Owner

cppla commented Apr 3, 2024

1.1.3已经解决该关键bug,@lianyis @xulinbao

docker pull /cppla/serverstatus:latest

@escher248
Copy link

1.1.3已经解决该关键bug,@lianyis @xulinbao

docker pull /cppla/serverstatus:latest

这个延时5s判断能不能自定义设置

@cppla
Copy link
Owner

cppla commented Apr 8, 2024

1.1.3已经解决该关键bug,@lianyis @xulinbao
docker pull /cppla/serverstatus:latest

这个延时5s判断能不能自定义设置

自定义这个时间意义不是特别大吧?

@escher248
Copy link

1.1.3已经解决该关键bug,@lianyis @xulinbao
docker pull /cppla/serverstatus:latest

这个延时5s判断能不能自定义设置

自定义这个时间意义不是特别大吧?
我发现更新到latest版本后,因为网络波动还是会经常报警,我看把这个时间调大点会不会正常些

@cppla
Copy link
Owner

cppla commented Apr 8, 2024

1.1.3已经解决该关键bug,@lianyis @xulinbao
docker pull /cppla/serverstatus:latest

这个延时5s判断能不能自定义设置

自定义这个时间意义不是特别大吧?
我发现更新到latest版本后,因为网络波动还是会经常报警,我看把这个时间调大点会不会正常些

编译docker image中,半个小时后再拉取一下:docker pull /cppla/serverstatus:latest。默认值已经改为15秒了,你再看下是否会误报。

@escher248
Copy link

1.1.3已经解决该关键bug,@lianyis @xulinbao
docker pull /cppla/serverstatus:latest

这个延时5s判断能不能自定义设置

自定义这个时间意义不是特别大吧?
我发现更新到latest版本后,因为网络波动还是会经常报警,我看把这个时间调大点会不会正常些

编译docker image中,半个小时后再拉取一下:docker pull /cppla/serverstatus:latest。默认值已经改为15秒了,你再看下是否会误报。

好的,多谢大佬~

@escher248
Copy link

1.1.3已经解决该关键bug,@lianyis @xulinbao
docker pull /cppla/serverstatus:latest

这个延时5s判断能不能自定义设置

自定义这个时间意义不是特别大吧?
我发现更新到latest版本后,因为网络波动还是会经常报警,我看把这个时间调大点会不会正常些

编译docker image中,半个小时后再拉取一下:docker pull /cppla/serverstatus:latest。默认值已经改为15秒了,你再看下是否会误报。

我更新之后,手动停掉client进程,等待几分钟后也没有报警,但是我用1.1.2的版本立马可以收到报警
配置如下:
{
"name": "服务器离线",
"rule": "online4=0&online6=0",
"interval": 1000,
"callback": "https://api2.pushdeer.com/message/push?pushkey=${key}&text="
}

@cppla
Copy link
Owner

cppla commented Apr 8, 2024

阈值限制了,1000s是16分钟。。 16分钟内只报告一次。

为了方便测试可以先把阈值修改为1s @lianyis

另外 docker logs serverstatus -f 能看到日志的输出。

@cppla
Copy link
Owner

cppla commented Apr 8, 2024

(不发)网络波动,No alarm information is sent due to network fluctuations
(不发)客户端下线但未超过阈值,No alarm if the threshold is not exceeded
(发送)客户端下线且超过阈值, Client disconnects and sends alert information

@lianyis

@xulinbao
Copy link

xulinbao commented Apr 9, 2024

辛苦大佬了,谢谢 :)

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

4 participants