From bd84c433cd8f41f9781a0eae27f226b4a63d677f Mon Sep 17 00:00:00 2001 From: UlricQin Date: Tue, 31 Aug 2021 16:50:57 +0800 Subject: [PATCH] set alias blank if __alias__ not found --- trans/push.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trans/push.go b/trans/push.go index 171688bc..286cea05 100644 --- a/trans/push.go +++ b/trans/push.go @@ -39,6 +39,8 @@ func Push(points []*vos.MetricPoint) error { // 如果tags中发现有__ident__和__alias__就提到外层,这个逻辑是为了应对snmp之类的场景 if val, has := points[i].TagsMap["__ident__"]; has { points[i].Ident = val + // 如果后面没有发现__alias__,那alias就给改成空 + points[i].Alias = "" delete(points[i].TagsMap, "__ident__") }