From c5b1a6d77e92470262000cb81ae8adef1e646d06 Mon Sep 17 00:00:00 2001 From: Kok San Date: Wed, 9 Sep 2015 14:05:20 +0800 Subject: [PATCH 1/4] Redo: Capture host metrics from inside docker container via volume mount /:/rootfs/ --- plugins/system/ps/cpu/cpu_linux.go | 4 ++-- plugins/system/ps/disk/disk_linux.go | 2 +- plugins/system/ps/host/host_linux.go | 26 +++++++++++----------- plugins/system/ps/load/load_linux.go | 2 +- plugins/system/ps/mem/mem_linux.go | 4 ++-- plugins/system/ps/net/net_linux.go | 2 +- plugins/system/ps/process/process_linux.go | 16 ++++++------- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/plugins/system/ps/cpu/cpu_linux.go b/plugins/system/ps/cpu/cpu_linux.go index c68bfd868..4b60548fc 100644 --- a/plugins/system/ps/cpu/cpu_linux.go +++ b/plugins/system/ps/cpu/cpu_linux.go @@ -12,7 +12,7 @@ import ( ) func CPUTimes(percpu bool) ([]CPUTimesStat, error) { - filename := "/proc/stat" + filename := "/rootfs/proc/stat" var lines = []string{} if percpu { var startIdx uint = 1 @@ -43,7 +43,7 @@ func CPUTimes(percpu bool) ([]CPUTimesStat, error) { } func CPUInfo() ([]CPUInfoStat, error) { - filename := "/proc/cpuinfo" + filename := "/rootfs/proc/cpuinfo" lines, _ := common.ReadLines(filename) var ret []CPUInfoStat diff --git a/plugins/system/ps/disk/disk_linux.go b/plugins/system/ps/disk/disk_linux.go index d70685257..d0e68d09d 100644 --- a/plugins/system/ps/disk/disk_linux.go +++ b/plugins/system/ps/disk/disk_linux.go @@ -42,7 +42,7 @@ func DiskPartitions(all bool) ([]DiskPartitionStat, error) { } func DiskIOCounters() (map[string]DiskIOCountersStat, error) { - filename := "/proc/diskstats" + filename := "/rootfs/proc/diskstats" lines, err := common.ReadLines(filename) if err != nil { return nil, err diff --git a/plugins/system/ps/host/host_linux.go b/plugins/system/ps/host/host_linux.go index d3b12669e..00b9c79f0 100644 --- a/plugins/system/ps/host/host_linux.go +++ b/plugins/system/ps/host/host_linux.go @@ -280,12 +280,12 @@ func GetVirtualization() (string, string, error) { var system string var role string - if common.PathExists("/proc/xen") { + if common.PathExists("/rootfs/proc/xen") { system = "xen" role = "guest" // assume guest - if common.PathExists("/proc/xen/capabilities") { - contents, err := common.ReadLines("/proc/xen/capabilities") + if common.PathExists("/rootfs/proc/xen/capabilities") { + contents, err := common.ReadLines("/rootfs/proc/xen/capabilities") if err == nil { if common.StringContains(contents, "control_d") { role = "host" @@ -293,8 +293,8 @@ func GetVirtualization() (string, string, error) { } } } - if common.PathExists("/proc/modules") { - contents, err := common.ReadLines("/proc/modules") + if common.PathExists("/rootfs/proc/modules") { + contents, err := common.ReadLines("/rootfs/proc/modules") if err == nil { if common.StringContains(contents, "kvm") { system = "kvm" @@ -309,8 +309,8 @@ func GetVirtualization() (string, string, error) { } } - if common.PathExists("/proc/cpuinfo") { - contents, err := common.ReadLines("/proc/cpuinfo") + if common.PathExists("/rootfs/proc/cpuinfo") { + contents, err := common.ReadLines("/rootfs/proc/cpuinfo") if err == nil { if common.StringContains(contents, "QEMU Virtual CPU") || common.StringContains(contents, "Common KVM processor") || @@ -321,18 +321,18 @@ func GetVirtualization() (string, string, error) { } } - if common.PathExists("/proc/bc/0") { + if common.PathExists("/rootfs/proc/bc/0") { system = "openvz" role = "host" - } else if common.PathExists("/proc/vz") { + } else if common.PathExists("/rootfs/proc/vz") { system = "openvz" role = "guest" } // not use dmidecode because it requires root - if common.PathExists("/proc/self/status") { - contents, err := common.ReadLines("/proc/self/status") + if common.PathExists("/rootfs/proc/self/status") { + contents, err := common.ReadLines("/rootfs/proc/self/status") if err == nil { if common.StringContains(contents, "s_context:") || @@ -343,8 +343,8 @@ func GetVirtualization() (string, string, error) { } } - if common.PathExists("/proc/self/cgroup") { - contents, err := common.ReadLines("/proc/self/cgroup") + if common.PathExists("/rootfs/proc/self/cgroup") { + contents, err := common.ReadLines("/rootfs/proc/self/cgroup") if err == nil { if common.StringContains(contents, "lxc") || diff --git a/plugins/system/ps/load/load_linux.go b/plugins/system/ps/load/load_linux.go index 6c9926b3b..b37a46e5e 100644 --- a/plugins/system/ps/load/load_linux.go +++ b/plugins/system/ps/load/load_linux.go @@ -9,7 +9,7 @@ import ( ) func LoadAvg() (*LoadAvgStat, error) { - filename := "/proc/loadavg" + filename := "/rootfs/proc/loadavg" line, err := ioutil.ReadFile(filename) if err != nil { return nil, err diff --git a/plugins/system/ps/mem/mem_linux.go b/plugins/system/ps/mem/mem_linux.go index 42a49a2b6..c36744dda 100644 --- a/plugins/system/ps/mem/mem_linux.go +++ b/plugins/system/ps/mem/mem_linux.go @@ -11,7 +11,7 @@ import ( ) func VirtualMemory() (*VirtualMemoryStat, error) { - filename := "/proc/meminfo" + filename := "/rootfs/proc/meminfo" lines, _ := common.ReadLines(filename) ret := &VirtualMemoryStat{} @@ -67,7 +67,7 @@ func SwapMemory() (*SwapMemoryStat, error) { } else { ret.UsedPercent = 0 } - lines, _ := common.ReadLines("/proc/vmstat") + lines, _ := common.ReadLines("/rootfs/proc/vmstat") for _, l := range lines { fields := strings.Fields(l) if len(fields) < 2 { diff --git a/plugins/system/ps/net/net_linux.go b/plugins/system/ps/net/net_linux.go index 15a4d26de..ddd4684d0 100644 --- a/plugins/system/ps/net/net_linux.go +++ b/plugins/system/ps/net/net_linux.go @@ -15,7 +15,7 @@ import ( // every network interface installed on the system is returned // separately. func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) { - filename := "/proc/net/dev" + filename := "/rootfs/proc/net/dev" lines, err := common.ReadLines(filename) if err != nil { return nil, err diff --git a/plugins/system/ps/process/process_linux.go b/plugins/system/ps/process/process_linux.go index 558de41bb..e9c30ddee 100644 --- a/plugins/system/ps/process/process_linux.go +++ b/plugins/system/ps/process/process_linux.go @@ -181,7 +181,7 @@ func (p *Process) IsRunning() (bool, error) { return true, common.NotImplementedError } -// MemoryMaps get memory maps from /proc/(pid)/smaps +// MemoryMaps get memory maps from /rootfs/proc/(pid)/smaps func (p *Process) MemoryMaps(grouped bool) (*[]MemoryMapsStat, error) { pid := p.Pid var ret []MemoryMapsStat @@ -263,7 +263,7 @@ func (p *Process) MemoryMaps(grouped bool) (*[]MemoryMapsStat, error) { ** Internal functions **/ -// Get num_fds from /proc/(pid)/fd +// Get num_fds from /rootfs/proc/(pid)/fd func (p *Process) fillFromfd() (int32, []*OpenFilesStat, error) { pid := p.Pid statPath := filepath.Join("/", "proc", strconv.Itoa(int(pid)), "fd") @@ -296,7 +296,7 @@ func (p *Process) fillFromfd() (int32, []*OpenFilesStat, error) { return numFDs, openfiles, nil } -// Get cwd from /proc/(pid)/cwd +// Get cwd from /rootfs/proc/(pid)/cwd func (p *Process) fillFromCwd() (string, error) { pid := p.Pid cwdPath := filepath.Join("/", "proc", strconv.Itoa(int(pid)), "cwd") @@ -307,7 +307,7 @@ func (p *Process) fillFromCwd() (string, error) { return string(cwd), nil } -// Get exe from /proc/(pid)/exe +// Get exe from /rootfs/proc/(pid)/exe func (p *Process) fillFromExe() (string, error) { pid := p.Pid exePath := filepath.Join("/", "proc", strconv.Itoa(int(pid)), "exe") @@ -318,7 +318,7 @@ func (p *Process) fillFromExe() (string, error) { return string(exe), nil } -// Get cmdline from /proc/(pid)/cmdline +// Get cmdline from /rootfs/proc/(pid)/cmdline func (p *Process) fillFromCmdline() (string, error) { pid := p.Pid cmdPath := filepath.Join("/", "proc", strconv.Itoa(int(pid)), "cmdline") @@ -336,7 +336,7 @@ func (p *Process) fillFromCmdline() (string, error) { return strings.Join(ret, " "), nil } -// Get IO status from /proc/(pid)/io +// Get IO status from /rootfs/proc/(pid)/io func (p *Process) fillFromIO() (*IOCountersStat, error) { pid := p.Pid ioPath := filepath.Join("/", "proc", strconv.Itoa(int(pid)), "io") @@ -375,7 +375,7 @@ func (p *Process) fillFromIO() (*IOCountersStat, error) { return ret, nil } -// Get memory info from /proc/(pid)/statm +// Get memory info from /rootfs/proc/(pid)/statm func (p *Process) fillFromStatm() (*MemoryInfoStat, *MemoryInfoExStat, error) { pid := p.Pid memPath := filepath.Join("/", "proc", strconv.Itoa(int(pid)), "statm") @@ -427,7 +427,7 @@ func (p *Process) fillFromStatm() (*MemoryInfoStat, *MemoryInfoExStat, error) { return memInfo, memInfoEx, nil } -// Get various status from /proc/(pid)/status +// Get various status from /rootfs/proc/(pid)/status func (p *Process) fillFromStatus() error { pid := p.Pid statPath := filepath.Join("/", "proc", strconv.Itoa(int(pid)), "status") From 5e46d5e45ac70af5d21ac630e87ce45afb43b848 Mon Sep 17 00:00:00 2001 From: me Date: Tue, 22 Sep 2015 12:57:12 +0800 Subject: [PATCH 2/4] Corrected import paths: influxdb/telegraf -> koksan83/telegraf --- CHANGELOG.md | 108 +++++++++--------- Godeps/Godeps.json | 2 +- README.md | 12 +- Vagrantfile | 4 +- agent.go | 4 +- agent_test.go | 2 +- circle-test.sh | 2 +- cmd/telegraf/telegraf.go | 6 +- config.go | 4 +- outputs/all/all.go | 6 +- outputs/datadog/datadog.go | 4 +- outputs/datadog/datadog_test.go | 2 +- outputs/influxdb/influxdb.go | 4 +- outputs/kafka/kafka.go | 2 +- outputs/kafka/kafka_test.go | 2 +- plugins/all/all.go | 36 +++--- plugins/disque/disque.go | 2 +- plugins/disque/disque_test.go | 2 +- plugins/elasticsearch/elasticsearch.go | 2 +- plugins/elasticsearch/elasticsearch_test.go | 2 +- plugins/exec/exec.go | 2 +- plugins/exec/exec_test.go | 2 +- plugins/haproxy/haproxy.go | 2 +- plugins/haproxy/haproxy_test.go | 2 +- plugins/httpjson/httpjson.go | 2 +- plugins/httpjson/httpjson_test.go | 2 +- plugins/kafka_consumer/kafka_consumer.go | 2 +- .../kafka_consumer_integration_test.go | 2 +- plugins/kafka_consumer/kafka_consumer_test.go | 2 +- plugins/leofs/leofs.go | 2 +- plugins/leofs/leofs_test.go | 2 +- plugins/lustre2/lustre2.go | 4 +- plugins/lustre2/lustre2_test.go | 2 +- plugins/memcached/memcached.go | 2 +- plugins/memcached/memcached_test.go | 2 +- plugins/mongodb/mongodb.go | 2 +- plugins/mongodb/mongodb_data.go | 2 +- plugins/mongodb/mongodb_data_test.go | 2 +- plugins/mongodb/mongodb_server.go | 2 +- plugins/mongodb/mongodb_server_test.go | 2 +- plugins/mysql/mysql.go | 2 +- plugins/mysql/mysql_test.go | 2 +- plugins/nginx/nginx.go | 2 +- plugins/nginx/nginx_test.go | 2 +- plugins/postgresql/postgresql.go | 2 +- plugins/postgresql/postgresql_test.go | 2 +- plugins/prometheus/prometheus.go | 2 +- plugins/prometheus/prometheus_test.go | 2 +- plugins/rabbitmq/rabbitmq.go | 2 +- plugins/rabbitmq/rabbitmq_test.go | 2 +- plugins/redis/redis.go | 2 +- plugins/redis/redis_test.go | 2 +- plugins/rethinkdb/rethinkdb.go | 2 +- plugins/rethinkdb/rethinkdb_data.go | 2 +- plugins/rethinkdb/rethinkdb_data_test.go | 2 +- plugins/rethinkdb/rethinkdb_server.go | 2 +- plugins/rethinkdb/rethinkdb_server_test.go | 2 +- plugins/system/cpu.go | 4 +- plugins/system/disk.go | 2 +- plugins/system/docker.go | 2 +- plugins/system/docker_test.go | 6 +- plugins/system/memory.go | 2 +- plugins/system/mock_PS.go | 10 +- plugins/system/net.go | 2 +- plugins/system/ps.go | 16 +-- plugins/system/ps/cpu/cpu_darwin.go | 2 +- plugins/system/ps/cpu/cpu_freebsd.go | 2 +- plugins/system/ps/cpu/cpu_linux.go | 2 +- plugins/system/ps/cpu/cpu_windows.go | 2 +- plugins/system/ps/disk/disk_darwin.go | 2 +- plugins/system/ps/disk/disk_freebsd.go | 2 +- plugins/system/ps/disk/disk_linux.go | 2 +- plugins/system/ps/disk/disk_test.go | 2 +- plugins/system/ps/disk/disk_windows.go | 2 +- plugins/system/ps/docker/docker_linux.go | 4 +- plugins/system/ps/docker/docker_notlinux.go | 4 +- plugins/system/ps/host/host_darwin.go | 2 +- plugins/system/ps/host/host_freebsd.go | 2 +- plugins/system/ps/host/host_linux.go | 2 +- plugins/system/ps/host/host_windows.go | 4 +- plugins/system/ps/load/load_darwin.go | 2 +- plugins/system/ps/load/load_freebsd.go | 2 +- plugins/system/ps/load/load_windows.go | 2 +- plugins/system/ps/mem/mem_darwin.go | 2 +- plugins/system/ps/mem/mem_freebsd.go | 2 +- plugins/system/ps/mem/mem_linux.go | 2 +- plugins/system/ps/mem/mem_windows.go | 2 +- plugins/system/ps/net/net_darwin.go | 2 +- plugins/system/ps/net/net_freebsd.go | 2 +- plugins/system/ps/net/net_linux.go | 2 +- plugins/system/ps/net/net_windows.go | 2 +- plugins/system/ps/process/process.go | 2 +- plugins/system/ps/process/process_darwin.go | 6 +- plugins/system/ps/process/process_freebsd.go | 6 +- plugins/system/ps/process/process_linux.go | 8 +- plugins/system/ps/process/process_test.go | 2 +- plugins/system/ps/process/process_windows.go | 6 +- plugins/system/system.go | 2 +- plugins/system/system_test.go | 12 +- scripts/telegraf.service | 2 +- 100 files changed, 216 insertions(+), 216 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5db15d9dc..ec5cd32e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,93 +1,93 @@ ## v0.1.7 [unreleased] ### Features -- [#38](https://github.com/influxdb/telegraf/pull/38): Kafka output producer. -- [#133](https://github.com/influxdb/telegraf/pull/133): Add plugin.Gather error logging. Thanks @nickscript0! -- [#136](https://github.com/influxdb/telegraf/issues/136): Add a -usage flag for printing usage of a single plugin. -- [#137](https://github.com/influxdb/telegraf/issues/137): Memcached: fix when a value contains a space -- [#138](https://github.com/influxdb/telegraf/issues/138): MySQL server address tag. -- [#142](https://github.com/influxdb/telegraf/pull/142): Add Description and SampleConfig funcs to output interface +- [#38](https://github.com/koksan83/telegraf/pull/38): Kafka output producer. +- [#133](https://github.com/koksan83/telegraf/pull/133): Add plugin.Gather error logging. Thanks @nickscript0! +- [#136](https://github.com/koksan83/telegraf/issues/136): Add a -usage flag for printing usage of a single plugin. +- [#137](https://github.com/koksan83/telegraf/issues/137): Memcached: fix when a value contains a space +- [#138](https://github.com/koksan83/telegraf/issues/138): MySQL server address tag. +- [#142](https://github.com/koksan83/telegraf/pull/142): Add Description and SampleConfig funcs to output interface - Indent the toml config file for readability ### Bugfixes -- [#128](https://github.com/influxdb/telegraf/issues/128): system_load measurement missing. -- [#129](https://github.com/influxdb/telegraf/issues/129): Latest pkg url fix. -- [#131](https://github.com/influxdb/telegraf/issues/131): Fix memory reporting on linux & darwin. Thanks @subhachandrachandra! -- [#140](https://github.com/influxdb/telegraf/issues/140): Memory plugin prec->perc typo fix. Thanks @brunoqc! +- [#128](https://github.com/koksan83/telegraf/issues/128): system_load measurement missing. +- [#129](https://github.com/koksan83/telegraf/issues/129): Latest pkg url fix. +- [#131](https://github.com/koksan83/telegraf/issues/131): Fix memory reporting on linux & darwin. Thanks @subhachandrachandra! +- [#140](https://github.com/koksan83/telegraf/issues/140): Memory plugin prec->perc typo fix. Thanks @brunoqc! ## v0.1.6 [2015-08-20] ### Features -- [#112](https://github.com/influxdb/telegraf/pull/112): Datadog output. Thanks @jipperinbham! -- [#116](https://github.com/influxdb/telegraf/pull/116): Use godep to vendor all dependencies -- [#120](https://github.com/influxdb/telegraf/pull/120): Httpjson plugin. Thanks @jpalay & @alvaromorales! +- [#112](https://github.com/koksan83/telegraf/pull/112): Datadog output. Thanks @jipperinbham! +- [#116](https://github.com/koksan83/telegraf/pull/116): Use godep to vendor all dependencies +- [#120](https://github.com/koksan83/telegraf/pull/120): Httpjson plugin. Thanks @jpalay & @alvaromorales! ### Bugfixes -- [#113](https://github.com/influxdb/telegraf/issues/113): Update README with Telegraf/InfluxDB compatibility -- [#118](https://github.com/influxdb/telegraf/pull/118): Fix for disk usage stats in Windows. Thanks @srfraser! -- [#122](https://github.com/influxdb/telegraf/issues/122): Fix for DiskUsage segv fault. Thanks @srfraser! -- [#126](https://github.com/influxdb/telegraf/issues/126): Nginx plugin not catching net.SplitHostPort error +- [#113](https://github.com/koksan83/telegraf/issues/113): Update README with Telegraf/InfluxDB compatibility +- [#118](https://github.com/koksan83/telegraf/pull/118): Fix for disk usage stats in Windows. Thanks @srfraser! +- [#122](https://github.com/koksan83/telegraf/issues/122): Fix for DiskUsage segv fault. Thanks @srfraser! +- [#126](https://github.com/koksan83/telegraf/issues/126): Nginx plugin not catching net.SplitHostPort error ## v0.1.5 [2015-08-13] ### Features -- [#54](https://github.com/influxdb/telegraf/pull/54): MongoDB plugin. Thanks @jipperinbham! -- [#55](https://github.com/influxdb/telegraf/pull/55): Elasticsearch plugin. Thanks @brocaar! -- [#71](https://github.com/influxdb/telegraf/pull/71): HAProxy plugin. Thanks @kureikain! -- [#72](https://github.com/influxdb/telegraf/pull/72): Adding TokuDB metrics to MySQL. Thanks vadimtk! -- [#73](https://github.com/influxdb/telegraf/pull/73): RabbitMQ plugin. Thanks @ianunruh! -- [#77](https://github.com/influxdb/telegraf/issues/77): Automatically create database. -- [#79](https://github.com/influxdb/telegraf/pull/56): Nginx plugin. Thanks @codeb2cc! -- [#86](https://github.com/influxdb/telegraf/pull/86): Lustre2 plugin. Thanks srfraser! -- [#91](https://github.com/influxdb/telegraf/pull/91): Unit testing -- [#92](https://github.com/influxdb/telegraf/pull/92): Exec plugin. Thanks @alvaromorales! -- [#98](https://github.com/influxdb/telegraf/pull/98): LeoFS plugin. Thanks @mocchira! -- [#103](https://github.com/influxdb/telegraf/pull/103): Filter by metric tags. Thanks @srfraser! -- [#106](https://github.com/influxdb/telegraf/pull/106): Options to filter plugins on startup. Thanks @zepouet! -- [#107](https://github.com/influxdb/telegraf/pull/107): Multiple outputs beyong influxdb. Thanks @jipperinbham! -- [#108](https://github.com/influxdb/telegraf/issues/108): Support setting per-CPU and total-CPU gathering. -- [#111](https://github.com/influxdb/telegraf/pull/111): Report CPU Usage in cpu plugin. Thanks @jpalay! +- [#54](https://github.com/koksan83/telegraf/pull/54): MongoDB plugin. Thanks @jipperinbham! +- [#55](https://github.com/koksan83/telegraf/pull/55): Elasticsearch plugin. Thanks @brocaar! +- [#71](https://github.com/koksan83/telegraf/pull/71): HAProxy plugin. Thanks @kureikain! +- [#72](https://github.com/koksan83/telegraf/pull/72): Adding TokuDB metrics to MySQL. Thanks vadimtk! +- [#73](https://github.com/koksan83/telegraf/pull/73): RabbitMQ plugin. Thanks @ianunruh! +- [#77](https://github.com/koksan83/telegraf/issues/77): Automatically create database. +- [#79](https://github.com/koksan83/telegraf/pull/56): Nginx plugin. Thanks @codeb2cc! +- [#86](https://github.com/koksan83/telegraf/pull/86): Lustre2 plugin. Thanks srfraser! +- [#91](https://github.com/koksan83/telegraf/pull/91): Unit testing +- [#92](https://github.com/koksan83/telegraf/pull/92): Exec plugin. Thanks @alvaromorales! +- [#98](https://github.com/koksan83/telegraf/pull/98): LeoFS plugin. Thanks @mocchira! +- [#103](https://github.com/koksan83/telegraf/pull/103): Filter by metric tags. Thanks @srfraser! +- [#106](https://github.com/koksan83/telegraf/pull/106): Options to filter plugins on startup. Thanks @zepouet! +- [#107](https://github.com/koksan83/telegraf/pull/107): Multiple outputs beyong influxdb. Thanks @jipperinbham! +- [#108](https://github.com/koksan83/telegraf/issues/108): Support setting per-CPU and total-CPU gathering. +- [#111](https://github.com/koksan83/telegraf/pull/111): Report CPU Usage in cpu plugin. Thanks @jpalay! ### Bugfixes -- [#85](https://github.com/influxdb/telegraf/pull/85): Fix GetLocalHost testutil function for mac users -- [#89](https://github.com/influxdb/telegraf/pull/89): go fmt fixes -- [#94](https://github.com/influxdb/telegraf/pull/94): Fix for issue #93, explicitly call sarama.v1 -> sarama -- [#101](https://github.com/influxdb/telegraf/issues/101): switch back from master branch if building locally -- [#99](https://github.com/influxdb/telegraf/issues/99): update integer output to new InfluxDB line protocol format +- [#85](https://github.com/koksan83/telegraf/pull/85): Fix GetLocalHost testutil function for mac users +- [#89](https://github.com/koksan83/telegraf/pull/89): go fmt fixes +- [#94](https://github.com/koksan83/telegraf/pull/94): Fix for issue #93, explicitly call sarama.v1 -> sarama +- [#101](https://github.com/koksan83/telegraf/issues/101): switch back from master branch if building locally +- [#99](https://github.com/koksan83/telegraf/issues/99): update integer output to new InfluxDB line protocol format ## v0.1.4 [2015-07-09] ### Features -- [#56](https://github.com/influxdb/telegraf/pull/56): Update README for Kafka plugin. Thanks @EmilS! +- [#56](https://github.com/koksan83/telegraf/pull/56): Update README for Kafka plugin. Thanks @EmilS! ### Bugfixes -- [#50](https://github.com/influxdb/telegraf/pull/50): Fix init.sh script to use telegraf directory. Thanks @jseriff! -- [#52](https://github.com/influxdb/telegraf/pull/52): Update CHANGELOG to reference updated directory. Thanks @benfb! +- [#50](https://github.com/koksan83/telegraf/pull/50): Fix init.sh script to use telegraf directory. Thanks @jseriff! +- [#52](https://github.com/koksan83/telegraf/pull/52): Update CHANGELOG to reference updated directory. Thanks @benfb! ## v0.1.3 [2015-07-05] ### Features -- [#35](https://github.com/influxdb/telegraf/pull/35): Add Kafka plugin. Thanks @EmilS! -- [#47](https://github.com/influxdb/telegraf/pull/47): Add RethinkDB plugin. Thanks @jipperinbham! +- [#35](https://github.com/koksan83/telegraf/pull/35): Add Kafka plugin. Thanks @EmilS! +- [#47](https://github.com/koksan83/telegraf/pull/47): Add RethinkDB plugin. Thanks @jipperinbham! ### Bugfixes -- [#45](https://github.com/influxdb/telegraf/pull/45): Skip disk tags that don't have a value. Thanks @jhofeditz! -- [#43](https://github.com/influxdb/telegraf/pull/43): Fix bug in MySQL plugin. Thanks @marcosnils! +- [#45](https://github.com/koksan83/telegraf/pull/45): Skip disk tags that don't have a value. Thanks @jhofeditz! +- [#43](https://github.com/koksan83/telegraf/pull/43): Fix bug in MySQL plugin. Thanks @marcosnils! ## v0.1.2 [2015-07-01] ### Features -- [#12](https://github.com/influxdb/telegraf/pull/12): Add Linux/ARM to the list of built binaries. Thanks @voxxit! -- [#14](https://github.com/influxdb/telegraf/pull/14): Clarify the S3 buckets that Telegraf is pushed to. -- [#16](https://github.com/influxdb/telegraf/pull/16): Convert Redis to use URI, support Redis AUTH. Thanks @jipperinbham! -- [#21](https://github.com/influxdb/telegraf/pull/21): Add memcached plugin. Thanks @Yukki! +- [#12](https://github.com/koksan83/telegraf/pull/12): Add Linux/ARM to the list of built binaries. Thanks @voxxit! +- [#14](https://github.com/koksan83/telegraf/pull/14): Clarify the S3 buckets that Telegraf is pushed to. +- [#16](https://github.com/koksan83/telegraf/pull/16): Convert Redis to use URI, support Redis AUTH. Thanks @jipperinbham! +- [#21](https://github.com/koksan83/telegraf/pull/21): Add memcached plugin. Thanks @Yukki! ### Bugfixes -- [#13](https://github.com/influxdb/telegraf/pull/13): Fix the packaging script. -- [#19](https://github.com/influxdb/telegraf/pull/19): Add host name to metric tags. Thanks @sherifzain! -- [#20](https://github.com/influxdb/telegraf/pull/20): Fix race condition with accumulator mutex. Thanks @nkatsaros! -- [#23](https://github.com/influxdb/telegraf/pull/23): Change name of folder for packages. Thanks @colinrymer! -- [#32](https://github.com/influxdb/telegraf/pull/32): Fix spelling of memoory -> memory. Thanks @tylernisonoff! +- [#13](https://github.com/koksan83/telegraf/pull/13): Fix the packaging script. +- [#19](https://github.com/koksan83/telegraf/pull/19): Add host name to metric tags. Thanks @sherifzain! +- [#20](https://github.com/koksan83/telegraf/pull/20): Fix race condition with accumulator mutex. Thanks @nkatsaros! +- [#23](https://github.com/koksan83/telegraf/pull/23): Change name of folder for packages. Thanks @colinrymer! +- [#32](https://github.com/koksan83/telegraf/pull/32): Fix spelling of memoory -> memory. Thanks @tylernisonoff! ## v0.1.1 [2015-06-19] diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 9400bc682..c173112a3 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,5 +1,5 @@ { - "ImportPath": "github.com/influxdb/telegraf", + "ImportPath": "github.com/koksan83/telegraf", "GoVersion": "go1.4.2", "Packages": [ "./..." diff --git a/README.md b/README.md index de84f2a8c..991720237 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Telegraf - A native agent for InfluxDB [![Circle CI](https://circleci.com/gh/influxdb/telegraf.svg?style=svg)](https://circleci.com/gh/influxdb/telegraf) +# Telegraf - A native agent for InfluxDB [![Circle CI](https://circleci.com/gh/koksan83/telegraf.svg?style=svg)](https://circleci.com/gh/koksan83/telegraf) Telegraf is an agent written in Go for collecting metrics from the system it's running on or from other services and writing them into InfluxDB. @@ -51,8 +51,8 @@ if you don't have it already. You also must build with golang version 1.4+ 1. [Install Go](https://golang.org/doc/install) 2. [Setup your GOPATH](https://golang.org/doc/code.html#GOPATH) -3. run `go get github.com/influxdb/telegraf` -4. `cd $GOPATH/src/github.com/influxdb/telegraf` +3. run `go get github.com/koksan83/telegraf` +4. `cd $GOPATH/src/github.com/koksan83/telegraf` 5. run `make` ### How to use it: @@ -186,7 +186,7 @@ it prepended. This is to keep plugins honest. * Plugins should call `plugins.Add` in their `init` function to register themselves. See below for a quick example. * To be available within Telegraf itself, plugins must add themselves to the -`github.com/influxdb/telegraf/plugins/all/all.go` file. +`github.com/koksan83/telegraf/plugins/all/all.go` file. * The `SampleConfig` function should return valid toml that describes how the plugin can be configured. This is include in `telegraf -sample-config`. * The `Description` function should say in one line what this plugin does. @@ -259,7 +259,7 @@ package simple // simple.go -import "github.com/influxdb/telegraf/plugins" +import "github.com/koksan83/telegraf/plugins" type Simple struct { Ok bool @@ -303,7 +303,7 @@ which would take some time to replicate. To overcome this situation we've decided to use docker containers to provide a fast and reproducible environment to test those services which require it. For other situations -(i.e: https://github.com/influxdb/telegraf/blob/master/plugins/redis/redis_test.go ) +(i.e: https://github.com/koksan83/telegraf/blob/master/plugins/redis/redis_test.go ) a simple mock will suffice. To execute Telegraf tests follow these simple steps: diff --git a/Vagrantfile b/Vagrantfile index 72124a8ac..a4140a0b5 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,7 +7,7 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "ubuntu/trusty64" - config.vm.synced_folder ".", "/home/vagrant/go/src/github.com/influxdb/telegraf", + config.vm.synced_folder ".", "/home/vagrant/go/src/github.com/koksan83/telegraf", type: "rsync", rsync__args: ["--verbose", "--archive", "--delete", "-z", "--safe-links"], rsync__exclude: ["./telegraf", ".vagrant/"] @@ -26,7 +26,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| gvm use go1.4.2 --default echo "export PATH=$PATH:$GOPATH/bin" >> "$HOME/.bashrc" echo 'export GOPATH=/home/vagrant/go' >> "$HOME/.bashrc" - cd "$HOME/go/src/github.com/influxdb/telegraf" &&\ + cd "$HOME/go/src/github.com/koksan83/telegraf" &&\ rm -rf Godeps/_workspace/pkg &&\ GOPATH="$HOME/go" make SHELL diff --git a/agent.go b/agent.go index e54b7e863..93d62a6f2 100644 --- a/agent.go +++ b/agent.go @@ -10,8 +10,8 @@ import ( "sync" "time" - "github.com/influxdb/telegraf/outputs" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/outputs" + "github.com/koksan83/telegraf/plugins" ) type runningOutput struct { diff --git a/agent_test.go b/agent_test.go index 913ce565f..cc8d2f94b 100644 --- a/agent_test.go +++ b/agent_test.go @@ -5,7 +5,7 @@ import ( "testing" // needing to load the plugins - _ "github.com/influxdb/telegraf/plugins/all" + _ "github.com/koksan83/telegraf/plugins/all" ) func TestAgent_LoadPlugin(t *testing.T) { diff --git a/circle-test.sh b/circle-test.sh index e8c7c131b..c0062631b 100755 --- a/circle-test.sh +++ b/circle-test.sh @@ -51,7 +51,7 @@ echo "\$CIRCLE_BRANCH: $CIRCLE_BRANCH" # Move the checked-out source to a better location exit_if_fail mv $HOME/telegraf $GOPATH/src/github.com/influxdb -exit_if_fail cd $GOPATH/src/github.com/influxdb/telegraf +exit_if_fail cd $GOPATH/src/github.com/koksan83/telegraf # Install the code exit_if_fail godep go build -v ./... diff --git a/cmd/telegraf/telegraf.go b/cmd/telegraf/telegraf.go index c7f863778..45ba91a5b 100644 --- a/cmd/telegraf/telegraf.go +++ b/cmd/telegraf/telegraf.go @@ -8,9 +8,9 @@ import ( "os/signal" "strings" - "github.com/influxdb/telegraf" - _ "github.com/influxdb/telegraf/outputs/all" - _ "github.com/influxdb/telegraf/plugins/all" + "github.com/koksan83/telegraf" + _ "github.com/koksan83/telegraf/outputs/all" + _ "github.com/koksan83/telegraf/plugins/all" ) var fDebug = flag.Bool("debug", false, diff --git a/config.go b/config.go index 19ebc00bf..eec99529f 100644 --- a/config.go +++ b/config.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/influxdb/telegraf/outputs" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/outputs" + "github.com/koksan83/telegraf/plugins" "github.com/naoina/toml" "github.com/naoina/toml/ast" ) diff --git a/outputs/all/all.go b/outputs/all/all.go index 36d11ea61..f0079ad07 100644 --- a/outputs/all/all.go +++ b/outputs/all/all.go @@ -1,7 +1,7 @@ package all import ( - _ "github.com/influxdb/telegraf/outputs/datadog" - _ "github.com/influxdb/telegraf/outputs/influxdb" - _ "github.com/influxdb/telegraf/outputs/kafka" + _ "github.com/koksan83/telegraf/outputs/datadog" + _ "github.com/koksan83/telegraf/outputs/influxdb" + _ "github.com/koksan83/telegraf/outputs/kafka" ) diff --git a/outputs/datadog/datadog.go b/outputs/datadog/datadog.go index 627ba125e..1a54b226f 100644 --- a/outputs/datadog/datadog.go +++ b/outputs/datadog/datadog.go @@ -9,8 +9,8 @@ import ( "sort" "github.com/influxdb/influxdb/client" - t "github.com/influxdb/telegraf" - "github.com/influxdb/telegraf/outputs" + t "github.com/koksan83/telegraf" + "github.com/koksan83/telegraf/outputs" ) type Datadog struct { diff --git a/outputs/datadog/datadog_test.go b/outputs/datadog/datadog_test.go index b5a7d3565..b51524f95 100644 --- a/outputs/datadog/datadog_test.go +++ b/outputs/datadog/datadog_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/influxdb/influxdb/client" "github.com/stretchr/testify/assert" diff --git a/outputs/influxdb/influxdb.go b/outputs/influxdb/influxdb.go index 5bb74b4e3..76cbc6bc6 100644 --- a/outputs/influxdb/influxdb.go +++ b/outputs/influxdb/influxdb.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/influxdb/influxdb/client" - t "github.com/influxdb/telegraf" - "github.com/influxdb/telegraf/outputs" + t "github.com/koksan83/telegraf" + "github.com/koksan83/telegraf/outputs" ) type InfluxDB struct { diff --git a/outputs/kafka/kafka.go b/outputs/kafka/kafka.go index ac4d61164..4b35cb35d 100644 --- a/outputs/kafka/kafka.go +++ b/outputs/kafka/kafka.go @@ -6,7 +6,7 @@ import ( "github.com/Shopify/sarama" "github.com/influxdb/influxdb/client" - "github.com/influxdb/telegraf/outputs" + "github.com/koksan83/telegraf/outputs" ) type Kafka struct { diff --git a/outputs/kafka/kafka_test.go b/outputs/kafka/kafka_test.go index e97bf1bb5..6d926fec1 100644 --- a/outputs/kafka/kafka_test.go +++ b/outputs/kafka/kafka_test.go @@ -3,7 +3,7 @@ package kafka import ( "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/require" ) diff --git a/plugins/all/all.go b/plugins/all/all.go index 8670c3d8b..be7c33cc9 100644 --- a/plugins/all/all.go +++ b/plugins/all/all.go @@ -1,22 +1,22 @@ package all import ( - _ "github.com/influxdb/telegraf/plugins/disque" - _ "github.com/influxdb/telegraf/plugins/elasticsearch" - _ "github.com/influxdb/telegraf/plugins/exec" - _ "github.com/influxdb/telegraf/plugins/haproxy" - _ "github.com/influxdb/telegraf/plugins/httpjson" - _ "github.com/influxdb/telegraf/plugins/kafka_consumer" - _ "github.com/influxdb/telegraf/plugins/leofs" - _ "github.com/influxdb/telegraf/plugins/lustre2" - _ "github.com/influxdb/telegraf/plugins/memcached" - _ "github.com/influxdb/telegraf/plugins/mongodb" - _ "github.com/influxdb/telegraf/plugins/mysql" - _ "github.com/influxdb/telegraf/plugins/nginx" - _ "github.com/influxdb/telegraf/plugins/postgresql" - _ "github.com/influxdb/telegraf/plugins/prometheus" - _ "github.com/influxdb/telegraf/plugins/rabbitmq" - _ "github.com/influxdb/telegraf/plugins/redis" - _ "github.com/influxdb/telegraf/plugins/rethinkdb" - _ "github.com/influxdb/telegraf/plugins/system" + _ "github.com/koksan83/telegraf/plugins/disque" + _ "github.com/koksan83/telegraf/plugins/elasticsearch" + _ "github.com/koksan83/telegraf/plugins/exec" + _ "github.com/koksan83/telegraf/plugins/haproxy" + _ "github.com/koksan83/telegraf/plugins/httpjson" + _ "github.com/koksan83/telegraf/plugins/kafka_consumer" + _ "github.com/koksan83/telegraf/plugins/leofs" + _ "github.com/koksan83/telegraf/plugins/lustre2" + _ "github.com/koksan83/telegraf/plugins/memcached" + _ "github.com/koksan83/telegraf/plugins/mongodb" + _ "github.com/koksan83/telegraf/plugins/mysql" + _ "github.com/koksan83/telegraf/plugins/nginx" + _ "github.com/koksan83/telegraf/plugins/postgresql" + _ "github.com/koksan83/telegraf/plugins/prometheus" + _ "github.com/koksan83/telegraf/plugins/rabbitmq" + _ "github.com/koksan83/telegraf/plugins/redis" + _ "github.com/koksan83/telegraf/plugins/rethinkdb" + _ "github.com/koksan83/telegraf/plugins/system" ) diff --git a/plugins/disque/disque.go b/plugins/disque/disque.go index 4e4e3b47f..58ef67882 100644 --- a/plugins/disque/disque.go +++ b/plugins/disque/disque.go @@ -10,7 +10,7 @@ import ( "strings" "sync" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) type Disque struct { diff --git a/plugins/disque/disque_test.go b/plugins/disque/disque_test.go index 257a87c84..6c2ff87d8 100644 --- a/plugins/disque/disque_test.go +++ b/plugins/disque/disque_test.go @@ -6,7 +6,7 @@ import ( "net" "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/elasticsearch/elasticsearch.go b/plugins/elasticsearch/elasticsearch.go index 2127e93b7..2f539c6b6 100644 --- a/plugins/elasticsearch/elasticsearch.go +++ b/plugins/elasticsearch/elasticsearch.go @@ -5,7 +5,7 @@ import ( "fmt" "net/http" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) const statsPath = "/_nodes/stats" diff --git a/plugins/elasticsearch/elasticsearch_test.go b/plugins/elasticsearch/elasticsearch_test.go index 9e1cf66c9..17d0e8844 100644 --- a/plugins/elasticsearch/elasticsearch_test.go +++ b/plugins/elasticsearch/elasticsearch_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" ) diff --git a/plugins/exec/exec.go b/plugins/exec/exec.go index 6c340db6f..f7a25c0dc 100644 --- a/plugins/exec/exec.go +++ b/plugins/exec/exec.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" "github.com/gonuts/go-shellquote" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" "os/exec" "sync" ) diff --git a/plugins/exec/exec_test.go b/plugins/exec/exec_test.go index 4464e2beb..28aecf00b 100644 --- a/plugins/exec/exec_test.go +++ b/plugins/exec/exec_test.go @@ -2,7 +2,7 @@ package exec import ( "fmt" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "testing" diff --git a/plugins/haproxy/haproxy.go b/plugins/haproxy/haproxy.go index df03ecced..ff2fdbe77 100644 --- a/plugins/haproxy/haproxy.go +++ b/plugins/haproxy/haproxy.go @@ -3,7 +3,7 @@ package haproxy import ( "encoding/csv" "fmt" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" "io" "net/http" "net/url" diff --git a/plugins/haproxy/haproxy_test.go b/plugins/haproxy/haproxy_test.go index b54f516c9..b1dd5522d 100644 --- a/plugins/haproxy/haproxy_test.go +++ b/plugins/haproxy/haproxy_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "net/http" diff --git a/plugins/httpjson/httpjson.go b/plugins/httpjson/httpjson.go index 665622d46..675dde4b0 100644 --- a/plugins/httpjson/httpjson.go +++ b/plugins/httpjson/httpjson.go @@ -10,7 +10,7 @@ import ( "strings" "sync" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) type HttpJson struct { diff --git a/plugins/httpjson/httpjson_test.go b/plugins/httpjson/httpjson_test.go index 9e9b7d2b7..b09858a18 100644 --- a/plugins/httpjson/httpjson_test.go +++ b/plugins/httpjson/httpjson_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/kafka_consumer/kafka_consumer.go b/plugins/kafka_consumer/kafka_consumer.go index 53fc8d110..b916ca209 100644 --- a/plugins/kafka_consumer/kafka_consumer.go +++ b/plugins/kafka_consumer/kafka_consumer.go @@ -7,7 +7,7 @@ import ( "github.com/Shopify/sarama" "github.com/influxdb/influxdb/tsdb" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" "github.com/wvanbergen/kafka/consumergroup" ) diff --git a/plugins/kafka_consumer/kafka_consumer_integration_test.go b/plugins/kafka_consumer/kafka_consumer_integration_test.go index 325318014..6d28e5a47 100644 --- a/plugins/kafka_consumer/kafka_consumer_integration_test.go +++ b/plugins/kafka_consumer/kafka_consumer_integration_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/Shopify/sarama" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/kafka_consumer/kafka_consumer_test.go b/plugins/kafka_consumer/kafka_consumer_test.go index 3b697282d..a2840752f 100644 --- a/plugins/kafka_consumer/kafka_consumer_test.go +++ b/plugins/kafka_consumer/kafka_consumer_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/Shopify/sarama" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/leofs/leofs.go b/plugins/leofs/leofs.go index ce6bd37ac..b74f5ce41 100644 --- a/plugins/leofs/leofs.go +++ b/plugins/leofs/leofs.go @@ -3,7 +3,7 @@ package leofs import ( "bufio" "fmt" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" "net/url" "os/exec" "strconv" diff --git a/plugins/leofs/leofs_test.go b/plugins/leofs/leofs_test.go index 62a9f3fa3..8ebae9672 100644 --- a/plugins/leofs/leofs_test.go +++ b/plugins/leofs/leofs_test.go @@ -1,7 +1,7 @@ package leofs import ( - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "io/ioutil" diff --git a/plugins/lustre2/lustre2.go b/plugins/lustre2/lustre2.go index 549e0fc3f..4a75e06ec 100644 --- a/plugins/lustre2/lustre2.go +++ b/plugins/lustre2/lustre2.go @@ -13,8 +13,8 @@ import ( "strconv" "strings" - "github.com/influxdb/telegraf/plugins" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + "github.com/koksan83/telegraf/plugins" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) // Lustre proc files can change between versions, so we want to future-proof diff --git a/plugins/lustre2/lustre2_test.go b/plugins/lustre2/lustre2_test.go index 850a4ff32..c6b0beb56 100644 --- a/plugins/lustre2/lustre2_test.go +++ b/plugins/lustre2/lustre2_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/memcached/memcached.go b/plugins/memcached/memcached.go index cbab91e85..bb130ecee 100644 --- a/plugins/memcached/memcached.go +++ b/plugins/memcached/memcached.go @@ -8,7 +8,7 @@ import ( "strconv" "time" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) // Memcached is a memcached plugin diff --git a/plugins/memcached/memcached_test.go b/plugins/memcached/memcached_test.go index 501fed1b9..07c91df3c 100644 --- a/plugins/memcached/memcached_test.go +++ b/plugins/memcached/memcached_test.go @@ -3,7 +3,7 @@ package memcached import ( "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/mongodb/mongodb.go b/plugins/mongodb/mongodb.go index b26da7a4e..d7eb53e10 100644 --- a/plugins/mongodb/mongodb.go +++ b/plugins/mongodb/mongodb.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" "gopkg.in/mgo.v2" ) diff --git a/plugins/mongodb/mongodb_data.go b/plugins/mongodb/mongodb_data.go index ba6cc8d95..96271a68c 100644 --- a/plugins/mongodb/mongodb_data.go +++ b/plugins/mongodb/mongodb_data.go @@ -5,7 +5,7 @@ import ( "reflect" "strconv" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) type MongodbData struct { diff --git a/plugins/mongodb/mongodb_data_test.go b/plugins/mongodb/mongodb_data_test.go index 9ee3f9f48..4dc7e46b1 100644 --- a/plugins/mongodb/mongodb_data_test.go +++ b/plugins/mongodb/mongodb_data_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/mongodb/mongodb_server.go b/plugins/mongodb/mongodb_server.go index d9b0edaad..929d02877 100644 --- a/plugins/mongodb/mongodb_server.go +++ b/plugins/mongodb/mongodb_server.go @@ -4,7 +4,7 @@ import ( "net/url" "time" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" ) diff --git a/plugins/mongodb/mongodb_server_test.go b/plugins/mongodb/mongodb_server_test.go index ec536bbef..69fbbc973 100644 --- a/plugins/mongodb/mongodb_server_test.go +++ b/plugins/mongodb/mongodb_server_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/mysql/mysql.go b/plugins/mysql/mysql.go index 1bc72ff2a..e247f8c28 100644 --- a/plugins/mysql/mysql.go +++ b/plugins/mysql/mysql.go @@ -6,7 +6,7 @@ import ( "strings" _ "github.com/go-sql-driver/mysql" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) type Mysql struct { diff --git a/plugins/mysql/mysql_test.go b/plugins/mysql/mysql_test.go index b4c29146e..a543e0443 100644 --- a/plugins/mysql/mysql_test.go +++ b/plugins/mysql/mysql_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/nginx/nginx.go b/plugins/nginx/nginx.go index 97f273b63..18dda5a71 100644 --- a/plugins/nginx/nginx.go +++ b/plugins/nginx/nginx.go @@ -11,7 +11,7 @@ import ( "sync" "time" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) type Nginx struct { diff --git a/plugins/nginx/nginx_test.go b/plugins/nginx/nginx_test.go index 5e1eb1e79..251aacd0d 100644 --- a/plugins/nginx/nginx_test.go +++ b/plugins/nginx/nginx_test.go @@ -8,7 +8,7 @@ import ( "net/url" "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/postgresql/postgresql.go b/plugins/postgresql/postgresql.go index 1a467fee9..4e3b48063 100644 --- a/plugins/postgresql/postgresql.go +++ b/plugins/postgresql/postgresql.go @@ -3,7 +3,7 @@ package postgresql import ( "database/sql" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" _ "github.com/lib/pq" ) diff --git a/plugins/postgresql/postgresql_test.go b/plugins/postgresql/postgresql_test.go index 363d289f9..ae649751e 100644 --- a/plugins/postgresql/postgresql_test.go +++ b/plugins/postgresql/postgresql_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/prometheus/prometheus.go b/plugins/prometheus/prometheus.go index 9e8b964e7..fc3df78a6 100644 --- a/plugins/prometheus/prometheus.go +++ b/plugins/prometheus/prometheus.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" "github.com/prometheus/client_golang/extraction" "github.com/prometheus/client_golang/model" ) diff --git a/plugins/prometheus/prometheus_test.go b/plugins/prometheus/prometheus_test.go index 4f79822c1..1439fbf01 100644 --- a/plugins/prometheus/prometheus_test.go +++ b/plugins/prometheus/prometheus_test.go @@ -6,7 +6,7 @@ import ( "net/http/httptest" "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/rabbitmq/rabbitmq.go b/plugins/rabbitmq/rabbitmq.go index 55b4b0a95..55f713b9a 100644 --- a/plugins/rabbitmq/rabbitmq.go +++ b/plugins/rabbitmq/rabbitmq.go @@ -5,7 +5,7 @@ import ( "fmt" "net/http" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) const DefaultUsername = "guest" diff --git a/plugins/rabbitmq/rabbitmq_test.go b/plugins/rabbitmq/rabbitmq_test.go index 689eb71cf..eedbf9045 100644 --- a/plugins/rabbitmq/rabbitmq_test.go +++ b/plugins/rabbitmq/rabbitmq_test.go @@ -6,7 +6,7 @@ import ( "net/http/httptest" "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/redis/redis.go b/plugins/redis/redis.go index 013793f1b..cda4df2bc 100644 --- a/plugins/redis/redis.go +++ b/plugins/redis/redis.go @@ -10,7 +10,7 @@ import ( "strings" "sync" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) type Redis struct { diff --git a/plugins/redis/redis_test.go b/plugins/redis/redis_test.go index adf38ef75..2b0480e52 100644 --- a/plugins/redis/redis_test.go +++ b/plugins/redis/redis_test.go @@ -6,7 +6,7 @@ import ( "net" "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/rethinkdb/rethinkdb.go b/plugins/rethinkdb/rethinkdb.go index 412145e1a..92741ee26 100644 --- a/plugins/rethinkdb/rethinkdb.go +++ b/plugins/rethinkdb/rethinkdb.go @@ -5,7 +5,7 @@ import ( "net/url" "sync" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" "gopkg.in/dancannon/gorethink.v1" ) diff --git a/plugins/rethinkdb/rethinkdb_data.go b/plugins/rethinkdb/rethinkdb_data.go index 5fae28931..fcdef2282 100644 --- a/plugins/rethinkdb/rethinkdb_data.go +++ b/plugins/rethinkdb/rethinkdb_data.go @@ -4,7 +4,7 @@ import ( "reflect" "time" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) type serverStatus struct { diff --git a/plugins/rethinkdb/rethinkdb_data_test.go b/plugins/rethinkdb/rethinkdb_data_test.go index 4c76b2340..60315c4d2 100644 --- a/plugins/rethinkdb/rethinkdb_data_test.go +++ b/plugins/rethinkdb/rethinkdb_data_test.go @@ -3,7 +3,7 @@ package rethinkdb import ( "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" ) diff --git a/plugins/rethinkdb/rethinkdb_server.go b/plugins/rethinkdb/rethinkdb_server.go index 9285068bd..dab729c84 100644 --- a/plugins/rethinkdb/rethinkdb_server.go +++ b/plugins/rethinkdb/rethinkdb_server.go @@ -9,7 +9,7 @@ import ( "strconv" "strings" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" "gopkg.in/dancannon/gorethink.v1" ) diff --git a/plugins/rethinkdb/rethinkdb_server_test.go b/plugins/rethinkdb/rethinkdb_server_test.go index 21ab0dbbd..13de03605 100644 --- a/plugins/rethinkdb/rethinkdb_server_test.go +++ b/plugins/rethinkdb/rethinkdb_server_test.go @@ -5,7 +5,7 @@ package rethinkdb import ( "testing" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/system/cpu.go b/plugins/system/cpu.go index ea34d2bbb..46f216ef4 100644 --- a/plugins/system/cpu.go +++ b/plugins/system/cpu.go @@ -3,8 +3,8 @@ package system import ( "fmt" - "github.com/influxdb/telegraf/plugins" - "github.com/influxdb/telegraf/plugins/system/ps/cpu" + "github.com/koksan83/telegraf/plugins" + "github.com/koksan83/telegraf/plugins/system/ps/cpu" ) type CPUStats struct { diff --git a/plugins/system/disk.go b/plugins/system/disk.go index 74348bdbe..1e89e881b 100644 --- a/plugins/system/disk.go +++ b/plugins/system/disk.go @@ -3,7 +3,7 @@ package system import ( "fmt" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) type DiskStats struct { diff --git a/plugins/system/docker.go b/plugins/system/docker.go index 5e22dc88e..7dcc8fb9f 100644 --- a/plugins/system/docker.go +++ b/plugins/system/docker.go @@ -5,7 +5,7 @@ package system import ( "fmt" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) type DockerStats struct { diff --git a/plugins/system/docker_test.go b/plugins/system/docker_test.go index 41dd2278b..fd68f2b96 100644 --- a/plugins/system/docker_test.go +++ b/plugins/system/docker_test.go @@ -5,9 +5,9 @@ package system import ( "testing" - "github.com/influxdb/telegraf/plugins/system/ps/cpu" - "github.com/influxdb/telegraf/plugins/system/ps/docker" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/plugins/system/ps/cpu" + "github.com/koksan83/telegraf/plugins/system/ps/docker" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/plugins/system/memory.go b/plugins/system/memory.go index 048012e83..19f16789a 100644 --- a/plugins/system/memory.go +++ b/plugins/system/memory.go @@ -3,7 +3,7 @@ package system import ( "fmt" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) type MemStats struct { diff --git a/plugins/system/mock_PS.go b/plugins/system/mock_PS.go index 86a3932b2..f5b404bc4 100644 --- a/plugins/system/mock_PS.go +++ b/plugins/system/mock_PS.go @@ -2,12 +2,12 @@ package system import "github.com/stretchr/testify/mock" -import "github.com/influxdb/telegraf/plugins/system/ps/cpu" -import "github.com/influxdb/telegraf/plugins/system/ps/disk" +import "github.com/koksan83/telegraf/plugins/system/ps/cpu" +import "github.com/koksan83/telegraf/plugins/system/ps/disk" -import "github.com/influxdb/telegraf/plugins/system/ps/load" -import "github.com/influxdb/telegraf/plugins/system/ps/mem" -import "github.com/influxdb/telegraf/plugins/system/ps/net" +import "github.com/koksan83/telegraf/plugins/system/ps/load" +import "github.com/koksan83/telegraf/plugins/system/ps/mem" +import "github.com/koksan83/telegraf/plugins/system/ps/net" type MockPS struct { mock.Mock diff --git a/plugins/system/net.go b/plugins/system/net.go index 8a8847968..a78545b65 100644 --- a/plugins/system/net.go +++ b/plugins/system/net.go @@ -4,7 +4,7 @@ import ( "fmt" "net" - "github.com/influxdb/telegraf/plugins" + "github.com/koksan83/telegraf/plugins" ) type NetIOStats struct { diff --git a/plugins/system/ps.go b/plugins/system/ps.go index 0bf67011b..a07d57817 100644 --- a/plugins/system/ps.go +++ b/plugins/system/ps.go @@ -5,14 +5,14 @@ import ( "strings" dc "github.com/fsouza/go-dockerclient" - "github.com/influxdb/telegraf/plugins" - "github.com/influxdb/telegraf/plugins/system/ps/common" - "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" + "github.com/koksan83/telegraf/plugins" + "github.com/koksan83/telegraf/plugins/system/ps/common" + "github.com/koksan83/telegraf/plugins/system/ps/cpu" + "github.com/koksan83/telegraf/plugins/system/ps/disk" + "github.com/koksan83/telegraf/plugins/system/ps/docker" + "github.com/koksan83/telegraf/plugins/system/ps/load" + "github.com/koksan83/telegraf/plugins/system/ps/mem" + "github.com/koksan83/telegraf/plugins/system/ps/net" ) type DockerContainerStat struct { diff --git a/plugins/system/ps/cpu/cpu_darwin.go b/plugins/system/ps/cpu/cpu_darwin.go index 0c054d2ef..bd00e6b70 100644 --- a/plugins/system/ps/cpu/cpu_darwin.go +++ b/plugins/system/ps/cpu/cpu_darwin.go @@ -24,7 +24,7 @@ import ( "strings" "unsafe" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) // sys/resource.h diff --git a/plugins/system/ps/cpu/cpu_freebsd.go b/plugins/system/ps/cpu/cpu_freebsd.go index a7798c556..c0fe0491e 100644 --- a/plugins/system/ps/cpu/cpu_freebsd.go +++ b/plugins/system/ps/cpu/cpu_freebsd.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) // sys/resource.h diff --git a/plugins/system/ps/cpu/cpu_linux.go b/plugins/system/ps/cpu/cpu_linux.go index 4b60548fc..b08a664a6 100644 --- a/plugins/system/ps/cpu/cpu_linux.go +++ b/plugins/system/ps/cpu/cpu_linux.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) func CPUTimes(percpu bool) ([]CPUTimesStat, error) { diff --git a/plugins/system/ps/cpu/cpu_windows.go b/plugins/system/ps/cpu/cpu_windows.go index 071d366c9..452a227bb 100644 --- a/plugins/system/ps/cpu/cpu_windows.go +++ b/plugins/system/ps/cpu/cpu_windows.go @@ -8,7 +8,7 @@ import ( "time" "unsafe" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) // TODO: Get percpu diff --git a/plugins/system/ps/disk/disk_darwin.go b/plugins/system/ps/disk/disk_darwin.go index cbd94bdab..00cbf6080 100644 --- a/plugins/system/ps/disk/disk_darwin.go +++ b/plugins/system/ps/disk/disk_darwin.go @@ -6,7 +6,7 @@ import ( "syscall" "unsafe" - "github.com/influxdb/telegraf/plugins/system/ps/common" + "github.com/koksan83/telegraf/plugins/system/ps/common" ) func DiskPartitions(all bool) ([]DiskPartitionStat, error) { diff --git a/plugins/system/ps/disk/disk_freebsd.go b/plugins/system/ps/disk/disk_freebsd.go index 5193f3568..04b55cf8d 100644 --- a/plugins/system/ps/disk/disk_freebsd.go +++ b/plugins/system/ps/disk/disk_freebsd.go @@ -9,7 +9,7 @@ import ( "syscall" "unsafe" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) const ( diff --git a/plugins/system/ps/disk/disk_linux.go b/plugins/system/ps/disk/disk_linux.go index d0e68d09d..967726a08 100644 --- a/plugins/system/ps/disk/disk_linux.go +++ b/plugins/system/ps/disk/disk_linux.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) const ( diff --git a/plugins/system/ps/disk/disk_test.go b/plugins/system/ps/disk/disk_test.go index becc6ad85..7b34876c4 100644 --- a/plugins/system/ps/disk/disk_test.go +++ b/plugins/system/ps/disk/disk_test.go @@ -5,7 +5,7 @@ import ( "runtime" "testing" - "github.com/influxdb/telegraf/plugins/system/ps/common" + "github.com/koksan83/telegraf/plugins/system/ps/common" ) func TestDisk_usage(t *testing.T) { diff --git a/plugins/system/ps/disk/disk_windows.go b/plugins/system/ps/disk/disk_windows.go index 232d3d0a0..112460815 100644 --- a/plugins/system/ps/disk/disk_windows.go +++ b/plugins/system/ps/disk/disk_windows.go @@ -9,7 +9,7 @@ import ( "time" "unsafe" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) var ( diff --git a/plugins/system/ps/docker/docker_linux.go b/plugins/system/ps/docker/docker_linux.go index 51f3bc9ca..390f32703 100644 --- a/plugins/system/ps/docker/docker_linux.go +++ b/plugins/system/ps/docker/docker_linux.go @@ -9,8 +9,8 @@ import ( "strconv" "strings" - "github.com/influxdb/telegraf/plugins/system/ps/common" - "github.com/influxdb/telegraf/plugins/system/ps/cpu" + "github.com/koksan83/telegraf/plugins/system/ps/common" + "github.com/koksan83/telegraf/plugins/system/ps/cpu" ) // GetDockerIDList returnes a list of DockerID. diff --git a/plugins/system/ps/docker/docker_notlinux.go b/plugins/system/ps/docker/docker_notlinux.go index ec7fc3d8d..c57c37549 100644 --- a/plugins/system/ps/docker/docker_notlinux.go +++ b/plugins/system/ps/docker/docker_notlinux.go @@ -5,8 +5,8 @@ package docker import ( "encoding/json" - "github.com/influxdb/telegraf/plugins/system/ps/common" - "github.com/influxdb/telegraf/plugins/system/ps/cpu" + "github.com/koksan83/telegraf/plugins/system/ps/common" + "github.com/koksan83/telegraf/plugins/system/ps/cpu" ) // GetDockerIDList returnes a list of DockerID. diff --git a/plugins/system/ps/host/host_darwin.go b/plugins/system/ps/host/host_darwin.go index 753e9af68..ea3d222b0 100644 --- a/plugins/system/ps/host/host_darwin.go +++ b/plugins/system/ps/host/host_darwin.go @@ -13,7 +13,7 @@ import ( "strings" "unsafe" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) func HostInfo() (*HostInfoStat, error) { diff --git a/plugins/system/ps/host/host_freebsd.go b/plugins/system/ps/host/host_freebsd.go index 6c06dc622..cfbf94f90 100644 --- a/plugins/system/ps/host/host_freebsd.go +++ b/plugins/system/ps/host/host_freebsd.go @@ -13,7 +13,7 @@ import ( "strings" "unsafe" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) const ( diff --git a/plugins/system/ps/host/host_linux.go b/plugins/system/ps/host/host_linux.go index 00b9c79f0..0b0148f51 100644 --- a/plugins/system/ps/host/host_linux.go +++ b/plugins/system/ps/host/host_linux.go @@ -14,7 +14,7 @@ import ( "syscall" "unsafe" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) type LSB struct { diff --git a/plugins/system/ps/host/host_windows.go b/plugins/system/ps/host/host_windows.go index 788130910..e7fa50473 100644 --- a/plugins/system/ps/host/host_windows.go +++ b/plugins/system/ps/host/host_windows.go @@ -8,8 +8,8 @@ import ( "strings" "time" - common "github.com/influxdb/telegraf/plugins/system/ps/common" - process "github.com/influxdb/telegraf/plugins/system/ps/process" + common "github.com/koksan83/telegraf/plugins/system/ps/common" + process "github.com/koksan83/telegraf/plugins/system/ps/process" ) var ( diff --git a/plugins/system/ps/load/load_darwin.go b/plugins/system/ps/load/load_darwin.go index 4e6931cd1..8f66628f8 100644 --- a/plugins/system/ps/load/load_darwin.go +++ b/plugins/system/ps/load/load_darwin.go @@ -5,7 +5,7 @@ package load import ( "strconv" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) func LoadAvg() (*LoadAvgStat, error) { diff --git a/plugins/system/ps/load/load_freebsd.go b/plugins/system/ps/load/load_freebsd.go index 8b1191d77..8759580da 100644 --- a/plugins/system/ps/load/load_freebsd.go +++ b/plugins/system/ps/load/load_freebsd.go @@ -5,7 +5,7 @@ package load import ( "strconv" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) func LoadAvg() (*LoadAvgStat, error) { diff --git a/plugins/system/ps/load/load_windows.go b/plugins/system/ps/load/load_windows.go index 440674148..ba1adad0e 100644 --- a/plugins/system/ps/load/load_windows.go +++ b/plugins/system/ps/load/load_windows.go @@ -3,7 +3,7 @@ package load import ( - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) func LoadAvg() (*LoadAvgStat, error) { diff --git a/plugins/system/ps/mem/mem_darwin.go b/plugins/system/ps/mem/mem_darwin.go index 43da44d1d..a0679a222 100644 --- a/plugins/system/ps/mem/mem_darwin.go +++ b/plugins/system/ps/mem/mem_darwin.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) func getPageSize() (uint64, error) { diff --git a/plugins/system/ps/mem/mem_freebsd.go b/plugins/system/ps/mem/mem_freebsd.go index aa83a246d..52534a48a 100644 --- a/plugins/system/ps/mem/mem_freebsd.go +++ b/plugins/system/ps/mem/mem_freebsd.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) func VirtualMemory() (*VirtualMemoryStat, error) { diff --git a/plugins/system/ps/mem/mem_linux.go b/plugins/system/ps/mem/mem_linux.go index c36744dda..2c6c9a411 100644 --- a/plugins/system/ps/mem/mem_linux.go +++ b/plugins/system/ps/mem/mem_linux.go @@ -7,7 +7,7 @@ import ( "strings" "syscall" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) func VirtualMemory() (*VirtualMemoryStat, error) { diff --git a/plugins/system/ps/mem/mem_windows.go b/plugins/system/ps/mem/mem_windows.go index b43c85c16..597069684 100644 --- a/plugins/system/ps/mem/mem_windows.go +++ b/plugins/system/ps/mem/mem_windows.go @@ -6,7 +6,7 @@ import ( "syscall" "unsafe" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) var ( diff --git a/plugins/system/ps/net/net_darwin.go b/plugins/system/ps/net/net_darwin.go index a9843fea3..acd23ff17 100644 --- a/plugins/system/ps/net/net_darwin.go +++ b/plugins/system/ps/net/net_darwin.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/influxdb/telegraf/plugins/system/ps/common" + "github.com/koksan83/telegraf/plugins/system/ps/common" ) func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) { diff --git a/plugins/system/ps/net/net_freebsd.go b/plugins/system/ps/net/net_freebsd.go index 7dbc1053d..9d56b154b 100644 --- a/plugins/system/ps/net/net_freebsd.go +++ b/plugins/system/ps/net/net_freebsd.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/influxdb/telegraf/plugins/system/ps/common" + "github.com/koksan83/telegraf/plugins/system/ps/common" ) func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) { diff --git a/plugins/system/ps/net/net_linux.go b/plugins/system/ps/net/net_linux.go index ddd4684d0..1683678fd 100644 --- a/plugins/system/ps/net/net_linux.go +++ b/plugins/system/ps/net/net_linux.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) // NetIOCounters returnes network I/O statistics for every network diff --git a/plugins/system/ps/net/net_windows.go b/plugins/system/ps/net/net_windows.go index 3ca8421c6..7c15567f7 100644 --- a/plugins/system/ps/net/net_windows.go +++ b/plugins/system/ps/net/net_windows.go @@ -8,7 +8,7 @@ import ( "syscall" "unsafe" - common "github.com/influxdb/telegraf/plugins/system/ps/common" + common "github.com/koksan83/telegraf/plugins/system/ps/common" ) var ( diff --git a/plugins/system/ps/process/process.go b/plugins/system/ps/process/process.go index e2374aa75..5387104e6 100644 --- a/plugins/system/ps/process/process.go +++ b/plugins/system/ps/process/process.go @@ -5,7 +5,7 @@ import ( "runtime" "time" - cpu "github.com/influxdb/telegraf/plugins/system/ps/cpu" + cpu "github.com/koksan83/telegraf/plugins/system/ps/cpu" ) type Process struct { diff --git a/plugins/system/ps/process/process_darwin.go b/plugins/system/ps/process/process_darwin.go index dc98b03ac..a9070e019 100644 --- a/plugins/system/ps/process/process_darwin.go +++ b/plugins/system/ps/process/process_darwin.go @@ -10,9 +10,9 @@ import ( "syscall" "unsafe" - common "github.com/influxdb/telegraf/plugins/system/ps/common" - cpu "github.com/influxdb/telegraf/plugins/system/ps/cpu" - net "github.com/influxdb/telegraf/plugins/system/ps/net" + common "github.com/koksan83/telegraf/plugins/system/ps/common" + cpu "github.com/koksan83/telegraf/plugins/system/ps/cpu" + net "github.com/koksan83/telegraf/plugins/system/ps/net" ) // copied from sys/sysctl.h diff --git a/plugins/system/ps/process/process_freebsd.go b/plugins/system/ps/process/process_freebsd.go index 80cf16128..f74db6c46 100644 --- a/plugins/system/ps/process/process_freebsd.go +++ b/plugins/system/ps/process/process_freebsd.go @@ -7,9 +7,9 @@ import ( "encoding/binary" "unsafe" - common "github.com/influxdb/telegraf/plugins/system/ps/common" - cpu "github.com/influxdb/telegraf/plugins/system/ps/cpu" - net "github.com/influxdb/telegraf/plugins/system/ps/net" + common "github.com/koksan83/telegraf/plugins/system/ps/common" + cpu "github.com/koksan83/telegraf/plugins/system/ps/cpu" + net "github.com/koksan83/telegraf/plugins/system/ps/net" ) // MemoryInfoExStat is different between OSes diff --git a/plugins/system/ps/process/process_linux.go b/plugins/system/ps/process/process_linux.go index e9c30ddee..5e248cadb 100644 --- a/plugins/system/ps/process/process_linux.go +++ b/plugins/system/ps/process/process_linux.go @@ -11,10 +11,10 @@ import ( "strings" "syscall" - common "github.com/influxdb/telegraf/plugins/system/ps/common" - cpu "github.com/influxdb/telegraf/plugins/system/ps/cpu" - host "github.com/influxdb/telegraf/plugins/system/ps/host" - net "github.com/influxdb/telegraf/plugins/system/ps/net" + common "github.com/koksan83/telegraf/plugins/system/ps/common" + cpu "github.com/koksan83/telegraf/plugins/system/ps/cpu" + host "github.com/koksan83/telegraf/plugins/system/ps/host" + net "github.com/koksan83/telegraf/plugins/system/ps/net" ) const ( diff --git a/plugins/system/ps/process/process_test.go b/plugins/system/ps/process/process_test.go index 4999b6ef7..005856f0f 100644 --- a/plugins/system/ps/process/process_test.go +++ b/plugins/system/ps/process/process_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/influxdb/telegraf/plugins/system/ps/common" + "github.com/koksan83/telegraf/plugins/system/ps/common" ) func testGetProcess() Process { diff --git a/plugins/system/ps/process/process_windows.go b/plugins/system/ps/process/process_windows.go index 1c6b5d74b..8238ea586 100644 --- a/plugins/system/ps/process/process_windows.go +++ b/plugins/system/ps/process/process_windows.go @@ -11,9 +11,9 @@ import ( "github.com/shirou/w32" - common "github.com/influxdb/telegraf/plugins/system/ps/common" - cpu "github.com/influxdb/telegraf/plugins/system/ps/cpu" - net "github.com/influxdb/telegraf/plugins/system/ps/net" + common "github.com/koksan83/telegraf/plugins/system/ps/common" + cpu "github.com/koksan83/telegraf/plugins/system/ps/cpu" + net "github.com/koksan83/telegraf/plugins/system/ps/net" ) const ( diff --git a/plugins/system/system.go b/plugins/system/system.go index f3c3bc7e8..4396a40b2 100644 --- a/plugins/system/system.go +++ b/plugins/system/system.go @@ -1,6 +1,6 @@ package system -import "github.com/influxdb/telegraf/plugins" +import "github.com/koksan83/telegraf/plugins" type SystemStats struct { ps PS diff --git a/plugins/system/system_test.go b/plugins/system/system_test.go index 78c13834b..a1110bf50 100644 --- a/plugins/system/system_test.go +++ b/plugins/system/system_test.go @@ -5,12 +5,12 @@ import ( "reflect" "testing" - "github.com/influxdb/telegraf/plugins/system/ps/cpu" - "github.com/influxdb/telegraf/plugins/system/ps/disk" - "github.com/influxdb/telegraf/plugins/system/ps/load" - "github.com/influxdb/telegraf/plugins/system/ps/mem" - "github.com/influxdb/telegraf/plugins/system/ps/net" - "github.com/influxdb/telegraf/testutil" + "github.com/koksan83/telegraf/plugins/system/ps/cpu" + "github.com/koksan83/telegraf/plugins/system/ps/disk" + "github.com/koksan83/telegraf/plugins/system/ps/load" + "github.com/koksan83/telegraf/plugins/system/ps/mem" + "github.com/koksan83/telegraf/plugins/system/ps/net" + "github.com/koksan83/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/scripts/telegraf.service b/scripts/telegraf.service index a5a764fef..ebc6ba616 100644 --- a/scripts/telegraf.service +++ b/scripts/telegraf.service @@ -1,6 +1,6 @@ [Unit] Description=The plugin-driven server agent for reporting metrics into InfluxDB -Documentation=https://github.com/influxdb/telegraf +Documentation=https://github.com/koksan83/telegraf After=network.target [Service] From 9a16e22c808276a25afeb13b730da201ac90b683 Mon Sep 17 00:00:00 2001 From: me Date: Tue, 22 Sep 2015 18:22:47 +0800 Subject: [PATCH 3/4] - Change Makefile to output statically linked binary - Change Vagrantfile --- Makefile | 4 +++- Vagrantfile | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5c27c5d95..926f3cefa 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,9 @@ UNAME := $(shell sh -c 'uname') VERSION := $(shell sh -c 'git describe --always --tags') build: prepare - $(GOPATH)/bin/godep go build -o telegraf -ldflags \ + CGO_ENABLED=0 GOOS=linux ARCH=amd64 $(GOPATH)/bin/godep go build -a -installsuffix cgo \ + -o telegraf \ + -ldflags \ "-X main.Version $(VERSION)" \ ./cmd/telegraf/telegraf.go diff --git a/Vagrantfile b/Vagrantfile index a4140a0b5..ca5e8be26 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -9,8 +9,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "ubuntu/trusty64" config.vm.synced_folder ".", "/home/vagrant/go/src/github.com/koksan83/telegraf", type: "rsync", - rsync__args: ["--verbose", "--archive", "--delete", "-z", "--safe-links"], - rsync__exclude: ["./telegraf", ".vagrant/"] + rsync__args: ["--verbose"], +# rsync__args: ["--verbose", "--archive", "--delete", "-z", "--safe-links"], + rsync__exclude: [".vagrant/"] + # rsync__exclude: ["./telegraf", ".vagrant/"] config.vm.provision "shell", name: "sudo", inline: <<-SHELL chown -R vagrant:vagrant /home/vagrant/go From 380a89228b679b0cd1fb034d4ee627e4cd845cbe Mon Sep 17 00:00:00 2001 From: Kok San Date: Mon, 5 Oct 2015 16:19:07 +0800 Subject: [PATCH 4/4] Edit Makefile --- .../src/github.com/fsouza/go-dockerclient/testing/data/symlink | 1 - Makefile | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 120000 Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/data/symlink diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/data/symlink b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/data/symlink deleted file mode 120000 index 3ddf86a35..000000000 --- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/data/symlink +++ /dev/null @@ -1 +0,0 @@ -doesnotexist \ No newline at end of file diff --git a/Makefile b/Makefile index 926f3cefa..ce3b59734 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ UNAME := $(shell sh -c 'uname') VERSION := $(shell sh -c 'git describe --always --tags') build: prepare - CGO_ENABLED=0 GOOS=linux ARCH=amd64 $(GOPATH)/bin/godep go build -a -installsuffix cgo \ + CGO_ENABLED=0 $(GOPATH)/bin/godep go build -a -installsuffix cgo \ -o telegraf \ -ldflags \ "-X main.Version $(VERSION)" \