We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6911d16 commit 178d6e0Copy full SHA for 178d6e0
metric/system/net.go
@@ -217,6 +217,9 @@ func (s *NetIOStats) Collect() (datas []map[string]interface{}, err error) {
217
218
func (s *NetIOStats) initInterfaces() {
219
if interfaces, err := net.Interfaces(); err == nil {
220
+ if len(s.InterfacesMap) > 0 {
221
+ s.InterfacesMap = make(map[string]net.Interface)
222
+ }
223
for _, _interface := range interfaces {
224
s.InterfacesMap[_interface.Name] = _interface
225
}
0 commit comments