summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorAntoine Eiche <antoine.eiche@cloudwatt.com>2016-06-14 09:19:03 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-06-14 16:46:39 +0900
commitca2e7730bd8838b1f633e1f1808e0edce9269162 (patch)
tree71265c09ac47e744ceac248a68d9c0a330b84ac6 /server
parent2f7d308c063289de51dfda52bde37fd276e3ce08 (diff)
collector: Dump some path attributes and some ECs
Diffstat (limited to 'server')
-rw-r--r--server/collector.go10
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
}