diff --git a/plugin/api/alerting/message.go b/plugin/api/alerting/message.go index d52d349d..59b23644 100644 --- a/plugin/api/alerting/message.go +++ b/plugin/api/alerting/message.go @@ -307,6 +307,7 @@ func (h *AlertAPI) getAlertMessage(w http.ResponseWriter, req *http.Request, ps "created": message.Created, "updated": message.Updated, "resource_name": rule.Resource.Name, + "resource_id": rule.Resource.ID, "resource_objects": rule.Resource.Objects, "conditions": rule.Conditions, "duration": duration.Milliseconds(), diff --git a/plugin/api/alerting/rule.go b/plugin/api/alerting/rule.go index aa2ce41e..4d121cc4 100644 --- a/plugin/api/alerting/rule.go +++ b/plugin/api/alerting/rule.go @@ -204,6 +204,7 @@ func (alertAPI *AlertAPI) getRuleDetail(w http.ResponseWriter, req *http.Request detailObj := util.MapStr{ "rule_name": obj.Name, "resource_name": obj.Resource.Name, + "resource_id": obj.Resource.ID, "resource_objects": obj.Resource.Objects, "bucket_size": obj.Metrics.BucketSize, //统计周期 "updated": obj.Updated,