mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(monitor): fix monitor process alert
修复进程监控报警后,没有触发前端报警提示的问题
This commit is contained in:
@@ -532,7 +532,9 @@ func (c *QueryCondition) setResType() {
|
||||
}
|
||||
}
|
||||
}
|
||||
c.ResType = resType
|
||||
if c.Query.Model.Database == monitor.METRIC_DATABASE_TELE {
|
||||
c.ResType = resType
|
||||
}
|
||||
}
|
||||
|
||||
func (c *QueryCondition) GetQueryResources() ([]jsonutils.JSONObject, error) {
|
||||
|
||||
@@ -190,6 +190,11 @@ func newRuleDescription(rule *Rule, alertDetails *monitor.CommonAlertMetricDetai
|
||||
ConditionType: alertDetails.ConditionType,
|
||||
},
|
||||
}
|
||||
if len(ruleDes.ResType) == 0 {
|
||||
if alertDetails.DB == monitor.METRIC_DATABASE_TELE {
|
||||
ruleDes.ResType = monitor.METRIC_RES_TYPE_HOST
|
||||
}
|
||||
}
|
||||
rule.RuleDescription = append(rule.RuleDescription, &ruleDes)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user