diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/collector.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/server/collector.go b/server/collector.go index c1930d09..e9039fde 100644 --- a/server/collector.go +++ b/server/collector.go @@ -118,9 +118,13 @@ func path2data(path *table.Path) (map[string]interface{}, map[string]string) { "Timestamp": path.GetTimestamp().String(), } - flat := path.GetNlri().Flat() - for key, value := range flat { - tags[key] = value + if err := bgp.FlatUpdate(tags, path.GetNlri().Flat()); err != nil { + log.Error(err) + } + for _, p := range path.GetPathAttrs() { + if err := bgp.FlatUpdate(tags, p.Flat()); err != nil { + log.Error(err) + } } return fields, tags } |