diff --git a/pkg/apis/monitor/unifiedmonitor_const.go b/pkg/apis/monitor/unifiedmonitor_const.go index 287c698348..ca86082c6b 100644 --- a/pkg/apis/monitor/unifiedmonitor_const.go +++ b/pkg/apis/monitor/unifiedmonitor_const.go @@ -20,6 +20,7 @@ var ( METRIC_RES_TYPE_OSS: "oss_name", METRIC_RES_TYPE_CLOUDACCOUNT: "cloudaccount_name", METRIC_RES_TYPE_STORAGE: "storage_name", + METRIC_RES_TYPE_AGENT: "vm_name", } MEASUREMENT_TAG_ID = map[string]string{ METRIC_RES_TYPE_HOST: "host_id", diff --git a/pkg/monitor/alerting/conditions/query.go b/pkg/monitor/alerting/conditions/query.go index ae8e7eead5..bd90e2a9e1 100644 --- a/pkg/monitor/alerting/conditions/query.go +++ b/pkg/monitor/alerting/conditions/query.go @@ -752,6 +752,8 @@ func (c *QueryCondition) getTagKeyRelationMap() map[string]string { relationMap = monitor.DomainTags case monitor.METRIC_RES_TYPE_STORAGE: relationMap = monitor.StorageTags + case monitor.METRIC_RES_TYPE_AGENT: + relationMap = monitor.ServerTags default: relationMap = monitor.HostTags }