Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into revive_enforce-sl…
Browse files Browse the repository at this point in the history
…ice-style_parsers_processors_secretstores_serializers
  • Loading branch information
zak-pawel committed Oct 9, 2024
2 parents 2bfa09b + f4f7a63 commit 9afa693
Show file tree
Hide file tree
Showing 120 changed files with 1,700 additions and 1,176 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ executors:
working_directory: '/go/src/github.com/influxdata/telegraf'
resource_class: large
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.23.1'
- image: 'quay.io/influxdb/telegraf-ci:1.23.2'
environment:
GOFLAGS: -p=4
mac:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/readme-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.23.1'
go-version: '1.23.2'
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down
18 changes: 18 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ linters-settings:
- name: constant-logical-expr
- name: context-as-argument
- name: context-keys-type
- name: datarace
- name: deep-exit
- name: defer
- name: dot-imports
Expand Down Expand Up @@ -289,6 +290,23 @@ linters-settings:
- name: receiver-naming
- name: redefines-builtin-id
- name: redundant-import-alias
- name: string-format
arguments:
- - 'fmt.Errorf[0]'
- '/^([^A-Z]|$)/'
- 'Error string must not start with a capital letter.'
- - 'fmt.Errorf[0]'
- '/(^|[^\.!?])$/'
- 'Error string must not end in punctuation.'
- - 'errors.New[0]'
- '/^([^A-Z]|$)/'
- 'Error string must not start with a capital letter.'
- - 'errors.New[0]'
- '/(^|[^\.!?])$/'
- 'Error string must not end in punctuation.'
- - 'panic'
- '/^[^\n]*$/'
- 'Must not contain line breaks.'
- name: string-of-int
- name: struct-tag
- name: superfluous-else
Expand Down
39 changes: 38 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- markdownlint-disable MD024 -->
# Changelog

## Unreleased
## v1.32.1 [2024-10-07]

### Important Changes

Expand All @@ -10,6 +10,43 @@
requeueing. This way, those messages are not lost and can optionally be
handled using a dead-letter exchange by other means.

### Bugfixes

- [#15969](https://github.com/influxdata/telegraf/pull/15969) `agent` Fix buffer not flushing if all metrics are written
- [#15937](https://github.com/influxdata/telegraf/pull/15937) `config` Correctly print removal version info
- [#15900](https://github.com/influxdata/telegraf/pull/15900) `common.http` Keep timeout after creating oauth client
- [#15796](https://github.com/influxdata/telegraf/pull/15796) `inputs.amqp_consumer` NACKing messages on non-delivery related errors
- [#15923](https://github.com/influxdata/telegraf/pull/15923) `inputs.cisco_telemetry_mdt` Handle NXOS DME subtree telemetry format
- [#15907](https://github.com/influxdata/telegraf/pull/15907) `inputs.consul` Move config checking to Init method
- [#15982](https://github.com/influxdata/telegraf/pull/15982) `inputs.influxdb_v2_listener` Fix concurrent read/write dict
- [#15960](https://github.com/influxdata/telegraf/pull/15960) `inputs.vsphere` Add tags to VSAN ESA disks
- [#15921](https://github.com/influxdata/telegraf/pull/15921) `parsers.avro` Add mutex to cache access
- [#15965](https://github.com/influxdata/telegraf/pull/15965) `processors.aws_ec2` Remove leading slash and cancel worker only if it exists

### Dependency Updates

- [#15932](https://github.com/influxdata/telegraf/pull/15932) `deps` Bump cloud.google.com/go/monitoring from 1.20.2 to 1.21.1
- [#15863](https://github.com/influxdata/telegraf/pull/15863) `deps` Bump github.com/Azure/azure-kusto-go from 0.15.3 to 0.16.1
- [#15862](https://github.com/influxdata/telegraf/pull/15862) `deps` Bump github.com/Azure/azure-sdk-for-go/sdk/azcore from 1.13.0 to 1.14.0
- [#15957](https://github.com/influxdata/telegraf/pull/15957) `deps` Bump github.com/aws/aws-sdk-go-v2/feature/ec2/imds from 1.16.12 to 1.16.14
- [#15859](https://github.com/influxdata/telegraf/pull/15859) `deps` Bump github.com/aws/aws-sdk-go-v2/service/dynamodb from 1.34.4 to 1.34.9
- [#15931](https://github.com/influxdata/telegraf/pull/15931) `deps` Bump github.com/boschrexroth/ctrlx-datalayer-golang from 1.3.0 to 1.3.1
- [#15890](https://github.com/influxdata/telegraf/pull/15890) `deps` Bump github.com/harlow/kinesis-consumer from v0.3.6-0.20240606153816-553e2392fdf3 to v0.3.6-0.20240916192723-43900507c911
- [#15904](https://github.com/influxdata/telegraf/pull/15904) `deps` Bump github.com/netsampler/goflow2/v2 from 2.1.5 to 2.2.1
- [#15903](https://github.com/influxdata/telegraf/pull/15903) `deps` Bump github.com/p4lang/p4runtime from 1.3.0 to 1.4.0
- [#15905](https://github.com/influxdata/telegraf/pull/15905) `deps` Bump github.com/prometheus/client_golang from 1.20.2 to 1.20.3
- [#15930](https://github.com/influxdata/telegraf/pull/15930) `deps` Bump github.com/prometheus/client_golang from 1.20.3 to 1.20.4
- [#15962](https://github.com/influxdata/telegraf/pull/15962) `deps` Bump github.com/prometheus/common from 0.55.0 to 0.60.0
- [#15860](https://github.com/influxdata/telegraf/pull/15860) `deps` Bump github.com/snowflakedb/gosnowflake from 1.10.0 to 1.11.1
- [#15954](https://github.com/influxdata/telegraf/pull/15954) `deps` Bump github.com/srebhan/protobufquery from 0.0.0-20230803132024-ae4c0d878e55 to 1.0.1
- [#15929](https://github.com/influxdata/telegraf/pull/15929) `deps` Bump go.mongodb.org/mongo-driver from 1.16.0 to 1.17.0
- [#15902](https://github.com/influxdata/telegraf/pull/15902) `deps` Bump golang.org/x/mod from 0.19.0 to 0.21.0
- [#15955](https://github.com/influxdata/telegraf/pull/15955) `deps` Bump golang.org/x/oauth2 from 0.21.0 to 0.23.0
- [#15861](https://github.com/influxdata/telegraf/pull/15861) `deps` Bump golang.org/x/term from 0.23.0 to 0.24.0
- [#15856](https://github.com/influxdata/telegraf/pull/15856) `deps` Bump golangci-lint from v1.60.3 to v1.61.0
- [#15933](https://github.com/influxdata/telegraf/pull/15933) `deps` Bump k8s.io/apimachinery from 0.30.1 to 0.31.1
- [#15901](https://github.com/influxdata/telegraf/pull/15901) `deps` Bump modernc.org/sqlite from 1.32.0 to 1.33.1

## v1.32.0 [2024-09-09]

### Important Changes
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ plugins/parsers/influx/machine.go: plugins/parsers/influx/machine.go.rl

.PHONY: ci
ci:
docker build -t quay.io/influxdb/telegraf-ci:1.23.1 - < scripts/ci.docker
docker push quay.io/influxdb/telegraf-ci:1.23.1
docker build -t quay.io/influxdb/telegraf-ci:1.23.2 - < scripts/ci.docker
docker push quay.io/influxdb/telegraf-ci:1.23.2

.PHONY: install
install: $(buildbin)
Expand Down
4 changes: 2 additions & 2 deletions cmd/telegraf/telegraf.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,10 @@ func (t *Telegraf) runAgent(ctx context.Context, reloadConfig bool) error {
}

if !(t.test || t.testWait != 0) && len(c.Outputs) == 0 {
return errors.New("no outputs found, did you provide a valid config file?")
return errors.New("no outputs found, probably invalid config file provided")
}
if t.plugindDir == "" && len(c.Inputs) == 0 {
return errors.New("no inputs found, did you provide a valid config file?")
return errors.New("no inputs found, probably invalid config file provided")
}

if int64(c.Agent.Interval) <= 0 {
Expand Down
2 changes: 2 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,8 @@ func (c *Config) buildInput(name string, tbl *ast.Table) (*models.InputConfig, e
cp.CollectionJitter, _ = c.getFieldDuration(tbl, "collection_jitter")
cp.CollectionOffset, _ = c.getFieldDuration(tbl, "collection_offset")
cp.StartupErrorBehavior = c.getFieldString(tbl, "startup_error_behavior")
cp.TimeSource = c.getFieldString(tbl, "time_source")

cp.MeasurementPrefix = c.getFieldString(tbl, "name_prefix")
cp.MeasurementSuffix = c.getFieldString(tbl, "name_suffix")
cp.NameOverride = c.getFieldString(tbl, "name_override")
Expand Down
8 changes: 8 additions & 0 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,14 @@ Parameters that can be used with any input plugin:

When this value is set on a service input, multiple events occurring at the
same timestamp may be merged by the output database.
- **time_source**:
Specifies the source of the timestamp on metrics. Possible values are:
- `metric` will not alter the metric (default)
- `collection_start` sets the timestamp to when collection started
- `collection_end` set the timestamp to when collection finished

`time_source` will NOT be used for service inputs. It is up to each individual
service input to set the timestamp.
- **collection_jitter**:
Overrides the `collection_jitter` setting of the [agent][Agent] for the
plugin. Collection jitter is used to jitter the collection by a random
Expand Down
64 changes: 32 additions & 32 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/influxdata/telegraf
go 1.23.0

require (
cloud.google.com/go/bigquery v1.62.0
cloud.google.com/go/monitoring v1.20.2
cloud.google.com/go/pubsub v1.40.0
cloud.google.com/go/bigquery v1.63.1
cloud.google.com/go/monitoring v1.21.1
cloud.google.com/go/pubsub v1.42.0
cloud.google.com/go/storage v1.43.0
collectd.org v0.6.0
github.com/99designs/keyring v1.2.2
Expand Down Expand Up @@ -44,18 +44,18 @@ require (
github.com/aristanetworks/goarista v0.0.0-20190325233358-a123909ec740
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
github.com/awnumar/memguard v0.22.5
github.com/aws/aws-sdk-go-v2 v1.31.0
github.com/aws/aws-sdk-go-v2 v1.32.1
github.com/aws/aws-sdk-go-v2/config v1.27.27
github.com/aws/aws-sdk-go-v2/credentials v1.17.27
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.40.4
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.42.1
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.38.0
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.9
github.com/aws/aws-sdk-go-v2/service/ec2 v1.162.1
github.com/aws/aws-sdk-go-v2/service/kinesis v1.29.3
github.com/aws/aws-sdk-go-v2/service/sts v1.30.3
github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.27.4
github.com/aws/smithy-go v1.21.0
github.com/aws/smithy-go v1.22.0
github.com/benbjohnson/clock v1.3.5
github.com/blues/jsonata-go v1.5.4
github.com/bmatcuk/doublestar/v3 v3.0.0
Expand Down Expand Up @@ -106,9 +106,9 @@ require (
github.com/gorcon/rcon v1.3.5
github.com/gorilla/mux v1.8.1
github.com/gorilla/websocket v1.5.3
github.com/gosnmp/gosnmp v1.37.0
github.com/gosnmp/gosnmp v1.38.0
github.com/grid-x/modbus v0.0.0-20240503115206-582f2ab60a18
github.com/gwos/tcg/sdk v0.0.0-20231124052037-1e832b843240
github.com/gwos/tcg/sdk v0.0.0-20240830123415-f8a34bba6358
github.com/harlow/kinesis-consumer v0.3.6-0.20240916192723-43900507c911
github.com/hashicorp/consul/api v1.29.2
github.com/hashicorp/go-uuid v1.0.3
Expand Down Expand Up @@ -180,11 +180,11 @@ require (
github.com/sensu/sensu-go/api/core/v2 v2.16.0
github.com/shirou/gopsutil/v3 v3.24.4
github.com/showwin/speedtest-go v1.7.9
github.com/signalfx/golib/v3 v3.3.53
github.com/signalfx/golib/v3 v3.3.54
github.com/sijms/go-ora/v2 v2.8.19
github.com/sirupsen/logrus v1.9.3
github.com/sleepinggenius2/gosmi v0.4.4
github.com/snowflakedb/gosnowflake v1.11.1
github.com/snowflakedb/gosnowflake v1.11.2
github.com/srebhan/cborquery v1.0.1
github.com/srebhan/protobufquery v1.0.1
github.com/stretchr/testify v1.9.0
Expand Down Expand Up @@ -222,9 +222,9 @@ require (
golang.org/x/text v0.18.0
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20211230205640-daad0b7ba671
gonum.org/v1/gonum v0.15.1
google.golang.org/api v0.189.0
google.golang.org/genproto/googleapis/api v0.0.0-20240722135656-d784300faade
google.golang.org/grpc v1.65.0
google.golang.org/api v0.197.0
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1
google.golang.org/grpc v1.66.2
google.golang.org/protobuf v1.34.2
gopkg.in/gorethink/gorethink.v3 v3.0.5
gopkg.in/olivere/elastic.v5 v5.0.86
Expand All @@ -238,11 +238,11 @@ require (
)

require (
cloud.google.com/go v0.115.0 // indirect
cloud.google.com/go/auth v0.7.2 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect
cloud.google.com/go v0.115.1 // indirect
cloud.google.com/go/auth v0.9.3 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cloud.google.com/go/iam v1.1.10 // indirect
cloud.google.com/go/iam v1.2.1 // indirect
code.cloudfoundry.org/clock v1.0.0 // indirect
dario.cat/mergo v1.0.0 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
Expand Down Expand Up @@ -280,8 +280,8 @@ require (
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4 // indirect
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.13.7 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.20 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.20 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.20.1 // indirect
Expand Down Expand Up @@ -350,8 +350,8 @@ require (
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect
Expand Down Expand Up @@ -483,22 +483,22 @@ require (
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/collector/consumer v0.101.0 // indirect
go.opentelemetry.io/collector/semconv v0.105.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/sdk v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.23.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
golang.org/x/time v0.6.0 // indirect
golang.org/x/tools v0.24.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
golang.zx2c4.com/wireguard v0.0.0-20211209221555-9c9e7e272434 // indirect
google.golang.org/genproto v0.0.0-20240722135656-d784300faade // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade // indirect
google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
gopkg.in/fatih/pool.v2 v2.0.0 // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
Loading

0 comments on commit 9afa693

Please sign in to comment.