Add system uptime metric, string formatted AND in float64

closes #150
This commit is contained in:
Cameron Sparr
2015-08-31 14:03:38 -06:00
parent e2bc5d80c9
commit 9969c4e810
36 changed files with 3200 additions and 41 deletions

View File

@@ -10,7 +10,6 @@ import (
"github.com/influxdb/telegraf/plugins/system/ps/cpu"
"github.com/influxdb/telegraf/plugins/system/ps/disk"
"github.com/influxdb/telegraf/plugins/system/ps/docker"
"github.com/influxdb/telegraf/plugins/system/ps/load"
"github.com/influxdb/telegraf/plugins/system/ps/mem"
"github.com/influxdb/telegraf/plugins/system/ps/net"
)
@@ -24,7 +23,6 @@ type DockerContainerStat struct {
}
type PS interface {
LoadAvg() (*load.LoadAvgStat, error)
CPUTimes(perCPU, totalCPU bool) ([]cpu.CPUTimesStat, error)
DiskUsage() ([]*disk.DiskUsageStat, error)
NetIO() ([]net.NetIOCountersStat, error)
@@ -45,10 +43,6 @@ type systemPS struct {
dockerClient *dc.Client
}
func (s *systemPS) LoadAvg() (*load.LoadAvgStat, error) {
return load.LoadAvg()
}
func (s *systemPS) CPUTimes(perCPU, totalCPU bool) ([]cpu.CPUTimesStat, error) {
var cpuTimes []cpu.CPUTimesStat
if perCPU {