🚸 使用服务器端时间判断机器离线

This commit is contained in:
naiba
2021-07-16 11:14:07 +08:00
parent 321ccce931
commit 8f06d90c30
9 changed files with 34 additions and 14 deletions

View File

@@ -40,10 +40,10 @@ func (r *AlertRule) Check(points [][]interface{}) (int, bool) {
var count int
for i := 0; i < len(r.Rules); i++ {
if r.Rules[i].IsTransferDurationRule() {
// 循环区间流量报警
if max < 1 {
max = 1
}
// 循环区间流量报警
for j := len(points[i]) - 1; j >= 0; j-- {
if points[i][j] != nil {
count++