mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
fix: 修复因采样不足导致的告警
Some checks are pending
CodeQL / Analyze (go) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Contributors / contributors (push) Waiting to run
Sync / sync-to-jihulab (push) Waiting to run
Run Tests / tests (macos) (push) Waiting to run
Run Tests / tests (ubuntu) (push) Waiting to run
Run Tests / tests (windows) (push) Waiting to run
Some checks are pending
CodeQL / Analyze (go) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Contributors / contributors (push) Waiting to run
Sync / sync-to-jihulab (push) Waiting to run
Run Tests / tests (macos) (push) Waiting to run
Run Tests / tests (ubuntu) (push) Waiting to run
Run Tests / tests (windows) (push) Waiting to run
This commit is contained in:
parent
09b570aa3e
commit
8554f3eba7
@ -98,6 +98,8 @@ func (r *AlertRule) Check(points [][]bool) (maxDuration int, passed bool) {
|
||||
continue
|
||||
}
|
||||
if len(points) < duration {
|
||||
// 如果采样点数量不足 则认为检查通过
|
||||
hasPassedRule = true
|
||||
continue
|
||||
}
|
||||
total, fail := 0.0, 0.0
|
||||
|
Loading…
Reference in New Issue
Block a user