diff --git a/.circleci/config.yml b/.circleci/config.yml index af248dfa1..16003bacd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,30 +36,30 @@ jobs: steps: - attach_workspace: at: '/go/src' - - run: 'make check' + # disabled due to gofmt differences (1.10 vs 1.11). + #- run: 'make check' - run: 'make test' test-go-1.10: <<: [ *defaults, *go-1_10 ] steps: - attach_workspace: at: '/go/src' - - run: 'make check' + # disabled due to gofmt differences (1.10 vs 1.11). + #- run: 'make check' - run: 'make test' test-go-1.11: <<: [ *defaults, *go-1_11 ] steps: - attach_workspace: at: '/go/src' - # disabled due to gofmt differences (1.10 vs 1.11). - # - run: 'make check' + - run: 'make check' - run: 'make test' test-go-1.11-386: <<: [ *defaults, *go-1_11 ] steps: - attach_workspace: at: '/go/src' - # disabled due to gofmt differences (1.10 vs 1.11). - # - run: 'GOARCH=386 make check' + - run: 'GOARCH=386 make check' - run: 'GOARCH=386 make test' package: diff --git a/README.md b/README.md index 78d8a9758..d2d74a1f7 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Ansible role: https://github.com/rossmcdonald/telegraf Telegraf requires golang version 1.9 or newer, the Makefile requires GNU make. -1. [Install Go](https://golang.org/doc/install) >=1.9 (1.10 recommended) +1. [Install Go](https://golang.org/doc/install) >=1.9 (1.11 recommended) 2. [Install dep](https://golang.github.io/dep/docs/installation.html) ==v0.5.0 3. Download Telegraf source: ``` diff --git a/appveyor.yml b/appveyor.yml index 16d53388e..dfdf31d50 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,11 +12,11 @@ platform: x64 install: - IF NOT EXIST "C:\Cache" mkdir C:\Cache - - IF NOT EXIST "C:\Cache\go1.10.4.msi" curl -o "C:\Cache\go1.10.4.msi" https://storage.googleapis.com/golang/go1.10.4.windows-amd64.msi + - IF NOT EXIST "C:\Cache\go1.11.4.msi" curl -o "C:\Cache\go1.11.4.msi" https://storage.googleapis.com/golang/go1.11.4.windows-amd64.msi - IF NOT EXIST "C:\Cache\gnuwin32-bin.zip" curl -o "C:\Cache\gnuwin32-bin.zip" https://dl.influxdata.com/telegraf/ci/make-3.81-bin.zip - IF NOT EXIST "C:\Cache\gnuwin32-dep.zip" curl -o "C:\Cache\gnuwin32-dep.zip" https://dl.influxdata.com/telegraf/ci/make-3.81-dep.zip - IF EXIST "C:\Go" rmdir /S /Q C:\Go - - msiexec.exe /i "C:\Cache\go1.10.4.msi" /quiet + - msiexec.exe /i "C:\Cache\go1.11.4.msi" /quiet - 7z x "C:\Cache\gnuwin32-bin.zip" -oC:\GnuWin32 -y - 7z x "C:\Cache\gnuwin32-dep.zip" -oC:\GnuWin32 -y - go get -d github.com/golang/dep diff --git a/plugins/inputs/haproxy/haproxy_test.go b/plugins/inputs/haproxy/haproxy_test.go index 27a197304..e05031f19 100644 --- a/plugins/inputs/haproxy/haproxy_test.go +++ b/plugins/inputs/haproxy/haproxy_test.go @@ -248,30 +248,30 @@ func HaproxyGetFieldValues() map[string]interface{} { "http_response.4xx": uint64(140), "http_response.5xx": uint64(0), "http_response.other": uint64(0), - "iid": uint64(4), - "last_chk": "OK", - "lastchg": uint64(1036557), - "lastsess": int64(1342), - "lbtot": uint64(9481), - "mode": "http", - "pid": uint64(1), - "qcur": uint64(0), - "qmax": uint64(0), - "qtime": uint64(1268), - "rate": uint64(0), - "rate_max": uint64(2), - "rtime": uint64(2908), - "sid": uint64(1), - "scur": uint64(0), - "slim": uint64(2), - "smax": uint64(2), - "srv_abort": uint64(0), - "status": "UP", - "stot": uint64(14539), - "ttime": uint64(4500), - "weight": uint64(1), - "wredis": uint64(0), - "wretr": uint64(0), + "iid": uint64(4), + "last_chk": "OK", + "lastchg": uint64(1036557), + "lastsess": int64(1342), + "lbtot": uint64(9481), + "mode": "http", + "pid": uint64(1), + "qcur": uint64(0), + "qmax": uint64(0), + "qtime": uint64(1268), + "rate": uint64(0), + "rate_max": uint64(2), + "rtime": uint64(2908), + "sid": uint64(1), + "scur": uint64(0), + "slim": uint64(2), + "smax": uint64(2), + "srv_abort": uint64(0), + "status": "UP", + "stot": uint64(14539), + "ttime": uint64(4500), + "weight": uint64(1), + "wredis": uint64(0), + "wretr": uint64(0), } return fields } diff --git a/plugins/inputs/mqtt_consumer/mqtt_consumer.go b/plugins/inputs/mqtt_consumer/mqtt_consumer.go index 03c3696f0..da556159e 100644 --- a/plugins/inputs/mqtt_consumer/mqtt_consumer.go +++ b/plugins/inputs/mqtt_consumer/mqtt_consumer.go @@ -321,7 +321,7 @@ func init() { return &MQTTConsumer{ ConnectionTimeout: defaultConnectionTimeout, MaxUndeliveredMessages: defaultMaxUndeliveredMessages, - state: Disconnected, + state: Disconnected, } }) } diff --git a/plugins/inputs/mysql/mysql.go b/plugins/inputs/mysql/mysql.go index 3e9417cb0..0516e22b7 100644 --- a/plugins/inputs/mysql/mysql.go +++ b/plugins/inputs/mysql/mysql.go @@ -202,10 +202,10 @@ var ( "deleting": uint32(0), "executing": uint32(0), "execution of init_command": uint32(0), - "end": uint32(0), - "freeing items": uint32(0), - "flushing tables": uint32(0), - "fulltext initialization": uint32(0), + "end": uint32(0), + "freeing items": uint32(0), + "flushing tables": uint32(0), + "fulltext initialization": uint32(0), "idle": uint32(0), "init": uint32(0), "killed": uint32(0), @@ -241,8 +241,8 @@ var ( } // plaintext statuses stateStatusMappings = map[string]string{ - "user sleep": "idle", - "creating index": "altering table", + "user sleep": "idle", + "creating index": "altering table", "committing alter table to storage engine": "altering table", "discard or import tablespace": "altering table", "rename": "altering table", diff --git a/plugins/inputs/nginx_plus_api/nginx_plus_api_metrics_test.go b/plugins/inputs/nginx_plus_api/nginx_plus_api_metrics_test.go index a7516dee5..8105f35fb 100644 --- a/plugins/inputs/nginx_plus_api/nginx_plus_api_metrics_test.go +++ b/plugins/inputs/nginx_plus_api/nginx_plus_api_metrics_test.go @@ -776,10 +776,10 @@ func TestGatherHttpCachesMetrics(t *testing.T) { t, "nginx_plus_api_http_caches", map[string]interface{}{ - "bypass_bytes": int64(5510647548), - "bypass_bytes_written": int64(44992), - "bypass_responses": int64(200187), - "bypass_responses_written": int64(200173), + "bypass_bytes": int64(5510647548), + "bypass_bytes_written": int64(44992), + "bypass_responses": int64(200187), + "bypass_responses_written": int64(200173), "cold": false, "expired_bytes": int64(1656847080), "expired_bytes_written": int64(1641825173), @@ -810,10 +810,10 @@ func TestGatherHttpCachesMetrics(t *testing.T) { t, "nginx_plus_api_http_caches", map[string]interface{}{ - "bypass_bytes": int64(5510647548), - "bypass_bytes_written": int64(44992), - "bypass_responses": int64(200187), - "bypass_responses_written": int64(200173), + "bypass_bytes": int64(5510647548), + "bypass_bytes_written": int64(44992), + "bypass_responses": int64(200187), + "bypass_responses_written": int64(200173), "cold": false, "expired_bytes": int64(1656847080), "expired_bytes_written": int64(1641825173), diff --git a/plugins/inputs/nsq_consumer/nsq_consumer_test.go b/plugins/inputs/nsq_consumer/nsq_consumer_test.go index 8376f7bb1..6558dfba2 100644 --- a/plugins/inputs/nsq_consumer/nsq_consumer_test.go +++ b/plugins/inputs/nsq_consumer/nsq_consumer_test.go @@ -41,7 +41,7 @@ func TestReadsMetricsFromNSQ(t *testing.T) { Channel: "consume", MaxInFlight: 1, MaxUndeliveredMessages: defaultMaxUndeliveredMessages, - Nsqd: []string{"127.0.0.1:4155"}, + Nsqd: []string{"127.0.0.1:4155"}, } p, _ := parsers.NewInfluxParser() diff --git a/plugins/inputs/udp_listener/udp_listener_test.go b/plugins/inputs/udp_listener/udp_listener_test.go index 49115434a..ed206f173 100644 --- a/plugins/inputs/udp_listener/udp_listener_test.go +++ b/plugins/inputs/udp_listener/udp_listener_test.go @@ -36,8 +36,8 @@ func newTestUdpListener() (*UdpListener, chan []byte) { listener := &UdpListener{ ServiceAddress: ":8125", AllowedPendingMessages: 10000, - in: in, - done: make(chan struct{}), + in: in, + done: make(chan struct{}), } return listener, in } diff --git a/plugins/parsers/dropwizard/parser_test.go b/plugins/parsers/dropwizard/parser_test.go index 8ddcf7714..df33562db 100644 --- a/plugins/parsers/dropwizard/parser_test.go +++ b/plugins/parsers/dropwizard/parser_test.go @@ -106,9 +106,9 @@ func TestParseValidEmbeddedCounterJSON(t *testing.T) { "count": float64(1), }, metrics[0].Fields()) assert.Equal(t, map[string]string{ - "metric_type": "counter", - "tag1": "green", - "tag2": "yellow", + "metric_type": "counter", + "tag1": "green", + "tag2": "yellow", "tag3 space,comma=equals": "red ,=", }, metrics[0].Tags()) assert.True(t, metricTime.Equal(metrics[0].Time()), fmt.Sprintf("%s should be equal to %s", metrics[0].Time(), metricTime))