influxdb/monitor/network.go

22 lines
324 B
Go
Raw Normal View History

package monitor
import (
"os"
)
2015-09-04 20:14:38 +00:00
// network captures network diagnostics
type network struct{}
func (n *network) Diagnostics() (*Diagnostic, error) {
h, err := os.Hostname()
if err != nil {
return nil, err
}
diagnostics := map[string]interface{}{
"hostname": h,
}
return DiagnosticFromMap(diagnostics), nil
}