Merge pull request #10083 from zhaoxiangchun/bugfix/zxc-monitor-resouceName

fix(monitor): fix alert notify info do not contain resourceName
This commit is contained in:
Zexi Li
2021-01-30 10:37:06 +08:00
committed by GitHub
+3
View File
@@ -99,6 +99,9 @@ func (c *QueryCondition) filterTags(tags map[string]string, details monitor.Comm
if _, ok := ret["ip"]; !ok {
ret["ip"] = tags["host_ip"]
}
if _, ok := ret["name"]; !ok {
ret["name"] = tags["host"]
}
for _, tag := range []string{"brand", "platform", "hypervisor"} {
if val, ok := ret[tag]; ok {
ret["brand"] = val