mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fix(region): adjust the query range corresponding to the alarm strategy
The data in the cycle range may not be available yet, and the data in the last hour can be queried fixedly
This commit is contained in:
@@ -341,7 +341,7 @@ func (sa *SScalingAlarm) generateAlertConfig(sp *SScalingPolicy) (*monitor.Alert
|
||||
case api.OPERATOR_GT:
|
||||
cond = cond.GT(sa.Value)
|
||||
}
|
||||
q := cond.Query().From(fmt.Sprintf("%ds", sa.Cycle))
|
||||
q := cond.Query().From("1h")
|
||||
sel := q.Selects().Select(indicatorMap[sa.Indicator].Field)
|
||||
switch sa.Wrapper {
|
||||
case api.WRAPPER_AVER:
|
||||
|
||||
Reference in New Issue
Block a user