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
2017-10-25 20:52:40 +00:00

24 lines
378 B
Go

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
}