add element name as prefix to tagname in event format
@@ -111,10 +111,17 @@ func TagsFromGNMIPath(p *gnmi.Path) (string, map[string]string) {
}
if e.Key != nil {
for k, v := range e.Key {
+ if e.Name != "" {
+ elems := strings.Split(e.Name, ":")
+ if len(elems) > 0 {
+ tags[elems[len(elems)-1]+"_"+k] = v
+ }
+ } else {
tags[k] = v
}
}
}
+ }
if p.GetTarget() != "" {
tags["target"] = p.GetTarget()
}
