diff --git a/tcpmon/collector/net.go b/tcpmon/collector/net.go index cb5edb6..c661b12 100644 --- a/tcpmon/collector/net.go +++ b/tcpmon/collector/net.go @@ -5,7 +5,7 @@ import ( "time" "github.com/cockroachdb/errors" - "github.com/gogo/protobuf/proto" + "google.golang.org/protobuf/proto" "github.com/zperf/tcpmon/tcpmon/gproto" "github.com/zperf/tcpmon/tcpmon/parsing" @@ -35,6 +35,7 @@ func (m *NetstatCollector) Collect(now time.Time) ([]byte, error) { func (m *NetstatCollector) doCollect(now time.Time) (*gproto.NetstatMetric, error) { var metric gproto.NetstatMetric metric.Timestamp = now.Unix() + metric.Type = gproto.MetricType_NET err := CollectProc("snmp", &metric) if err != nil { diff --git a/tcpmon/collector/nic.go b/tcpmon/collector/nic.go index 9a22d70..5980778 100644 --- a/tcpmon/collector/nic.go +++ b/tcpmon/collector/nic.go @@ -6,7 +6,7 @@ import ( "github.com/cockroachdb/errors" "github.com/go-cmd/cmd" - "github.com/gogo/protobuf/proto" + "google.golang.org/protobuf/proto" "github.com/zperf/tcpmon/tcpmon/gproto" "github.com/zperf/tcpmon/tcpmon/parsing" diff --git a/tcpmon/collector/socket.go b/tcpmon/collector/socket.go index d38eb83..ec6826d 100644 --- a/tcpmon/collector/socket.go +++ b/tcpmon/collector/socket.go @@ -6,7 +6,7 @@ import ( "github.com/cockroachdb/errors" "github.com/go-cmd/cmd" - "github.com/gogo/protobuf/proto" + "google.golang.org/protobuf/proto" "github.com/zperf/tcpmon/tcpmon/gproto" "github.com/zperf/tcpmon/tcpmon/parsing"