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:
rainzm
2021-08-20 11:05:58 +08:00
parent 5c5f919899
commit 56e9d95763
+1 -1
View File
@@ -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: