1
0
mirror of https://github.com/Oxalide/vsphere-influxdb-go.git synced 2023-10-10 13:36:51 +02:00
vsphere-influxdb-go/vendor/github.com/influxdata/influxdb/monitor/network.go

24 lines
378 B
Go
Raw Normal View History

2017-10-25 22:52:40 +02:00
package monitor
import (
"os"
"github.com/influxdata/influxdb/monitor/diagnostics"
)
// network captures network diagnostics.
type network struct{}
func (n *network) Diagnostics() (*diagnostics.Diagnostics, error) {
h, err := os.Hostname()
if err != nil {
return nil, err
}
d := map[string]interface{}{
"hostname": h,
}
return diagnostics.RowFromMap(d), nil
}