From 8ae3d1a0f75831f8d25fcf6a90fe986b31a56b20 Mon Sep 17 00:00:00 2001 From: Kyle Brandt Date: Sat, 26 Sep 2015 18:59:48 +0000 Subject: [PATCH] cmd/scollector: Change mac address metadata format for linux to match others --- cmd/scollector/collectors/collectors.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/scollector/collectors/collectors.go b/cmd/scollector/collectors/collectors.go index 2ce3850015..fd20367898 100644 --- a/cmd/scollector/collectors/collectors.go +++ b/cmd/scollector/collectors/collectors.go @@ -274,8 +274,8 @@ func metaIfaces(f func(iface net.Interface, tags opentsdb.TagSet)) { } tags := opentsdb.TagSet{"iface": fmt.Sprint("Interface", iface.Index)} metadata.AddMeta("", tags, "name", iface.Name, true) - if mac := iface.HardwareAddr.String(); mac != "" { - metadata.AddMeta("", tags, "mac", iface.HardwareAddr.String(), true) + if mac := strings.ToUpper(strings.Replace(iface.HardwareAddr.String(), ":", "", -1)); mac != "" { + metadata.AddMeta("", tags, "mac", mac, true) } ads, _ := iface.Addrs() for i, ad := range ads {