Skip to content

Commit

Permalink
Merge branch 'master' into 9174-x509-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj authored May 25, 2022
2 parents 9a6e425 + ae98e7f commit 46f220b
Show file tree
Hide file tree
Showing 1,371 changed files with 20,032 additions and 5,652 deletions.
37 changes: 35 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,17 @@ commands:
- when:
condition: << parameters.nightly >>
steps:
- run: 'NIGHTLY=1 make package include_packages="$(make << parameters.type >>)"'
- run:
command: 'NIGHTLY=1 make package include_packages="$(make << parameters.type >>)"'
no_output_timeout: 30m
- unless:
condition:
or:
- << parameters.nightly >>
steps:
- run: 'make package include_packages="$(make << parameters.type >>)"'
- run:
command: 'make package include_packages="$(make << parameters.type >>)"'
no_output_timeout: 30m
- store_artifacts:
path: './build/dist'
destination: 'build/dist'
Expand Down Expand Up @@ -367,6 +371,32 @@ jobs:
--include "*.rpm" \
--include "*.zip" \
--acl public-read
docker-nightly:
machine:
image: ubuntu-2004:current
steps:
- run:
name: login to quay.io
command: docker login --username="${QUAY_USER}" --password="${QUAY_PASS}" quay.io
- run:
name: clone influxdata/influxdata-docker
command: git clone https://github.com/influxdata/influxdata-docker
- run:
name: build and push telegraf:nightly
command: |
cd influxdata-docker/telegraf/nightly
docker build -t telegraf .
docker tag telegraf quay.io/influxdb/telegraf-nightly:latest
docker image ls
docker push quay.io/influxdb/telegraf-nightly:latest
- run:
name: build and push telegraf:nightly-alpine
command: |
cd influxdata-docker/telegraf/nightly/alpine
docker build -t telegraf-alpine .
docker tag telegraf-alpine quay.io/influxdb/telegraf-nightly:alpine
docker image ls
docker push quay.io/influxdb/telegraf-nightly:alpine
package-sign-windows:
executor:
name: win/default
Expand Down Expand Up @@ -712,6 +742,9 @@ workflows:
- 'static-package-nightly'
- 'arm64-package-nightly'
- 'armhf-package-nightly'
- docker-nightly:
requires:
- 'nightly'
triggers:
- schedule:
cron: "0 7 * * *"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.45.2
version: v1.46.2
only-new-issues: true
golangci-master:
if: github.ref == 'refs/heads/master'
Expand All @@ -31,6 +31,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.45.2
version: v1.46.2
only-new-issues: true
args: --issues-exit-code=0
3 changes: 2 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v4.8.1
uses: github/super-linter@v4.9.2
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: '.'
MARKDOWN_CONFIG_FILE: .markdownlint.yml
VALIDATE_MARKDOWN: true
VALIDATE_BASH: true
23 changes: 23 additions & 0 deletions .github/workflows/readme-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint plugin readmes
on:
# push:
# branches-ignore: master
pull_request:
branches: # Names of target branches, not source branches
- master
jobs:
run-readme-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
with:
base_sha: ${{ github.event.pull_request.base.sha }}
files: plugins/**/README.md
- name: Run readme linter on changed files
run: go run ./tools/readme_linter ${{ steps.changed-files.outputs.all_changed_files }}
15 changes: 15 additions & 0 deletions .github/workflows/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "Semantic PR and Commit Messages"

on:
pull_request:
types: [opened, reopened, synchronize, edited]
branches:
- master

jobs:
semantic:
uses: influxdata/validate-semantic-github-messages/.github/workflows/semantic.yml@main
with:
CHECK_PR_TITLE_OR_ONE_COMMIT: true

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/telegraf
/telegraf.exe
/telegraf.gz
/tools/readme_config_includer/generator
/vendor
.DS_Store
process.yml
Expand Down
59 changes: 58 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,64 @@

# Changelog

## v1.22.4 [2022-05-16]

### Bugfixes

- [#11045](https://github.com/influxdata/telegraf/pull/11045) `inputs.couchbase` Do not assume metrics will all be of the same length
- [#11043](https://github.com/influxdata/telegraf/pull/11043) `inputs.statsd` Do not error when closing statsd network connection
- [#11030](https://github.com/influxdata/telegraf/pull/11030) `outputs.azure_monitor` Re-init azure monitor http client on context deadline error
- [#11078](https://github.com/influxdata/telegraf/pull/11078) `outputs.wavefront` If no "host" tag is provided do not add "telegraf.host" tag
- [#11042](https://github.com/influxdata/telegraf/pull/11042) Have telegraf service wait for network up in systemd packaging

### Dependency Updates

- [#10722](https://github.com/influxdata/telegraf/pull/10722) `inputs.internet_speed` Update github.com/showwin/speedtest-go from 1.1.4 to 1.1.5
- [#11085](https://github.com/influxdata/telegraf/pull/11085) Update OpenTelemetry plugins to v0.51.0

## v1.22.3 [2022-04-28]

### Bugfixes

- [#10961](https://github.com/influxdata/telegraf/pull/10961) Update Go to 1.18.1
- [#10976](https://github.com/influxdata/telegraf/pull/10976) `inputs.influxdb_listener` Remove duplicate influxdb listener writes with upstream parser
- [#11024](https://github.com/influxdata/telegraf/pull/11024) `inputs.gnmi` Use external xpath parser for gnmi
- [#10925](https://github.com/influxdata/telegraf/pull/10925) `inputs.system` Reduce log level in disk plugin back to original level

## v1.22.2 [2022-04-25]

### Bugfixes

- [#11008](https://github.com/influxdata/telegraf/pull/11008) `inputs.gnmi` Add mutex to gnmi lookup map
- [#11010](https://github.com/influxdata/telegraf/pull/11010) `inputs.gnmi` Use sprint to cast to strings in gnmi
- [#11001](https://github.com/influxdata/telegraf/pull/11001) `inputs.consul_agent` Use correct auth token with consul_agent
- [#10486](https://github.com/influxdata/telegraf/pull/10486) `inputs.mysql` Add mariadb_dialect to address the MariaDB differences in INNODB_METRICS
- [#10923](https://github.com/influxdata/telegraf/pull/10923) `inputs.smart` Correctly parse various numeric forms
- [#10850](https://github.com/influxdata/telegraf/pull/10850) `inputs.aliyuncms` Ensure aliyuncms metrics accept array, fix discovery
- [#10930](https://github.com/influxdata/telegraf/pull/10930) `inputs.aerospike` Statistics query bug
- [#10947](https://github.com/influxdata/telegraf/pull/10947) `inputs.cisco_telemetry_mdt` Align the default value for msg size
- [#10959](https://github.com/influxdata/telegraf/pull/10959) `inputs.cisco_telemetry_mdt` Remove overly verbose info message from cisco mdt
- [#10958](https://github.com/influxdata/telegraf/pull/10958) `outputs.influxdb_v2` Improve influxdb_v2 error message
- [#10932](https://github.com/influxdata/telegraf/pull/10932) `inputs.prometheus` Moved from watcher to informer
- [#11013](https://github.com/influxdata/telegraf/pull/11013) Also allow 0 outputs when using test-wait parameter
- [#11015](https://github.com/influxdata/telegraf/pull/11015) Allow Makefile to work on Windows

### Dependency Updates

- [#10966](https://github.com/influxdata/telegraf/pull/10966) Update github.com/Azure/azure-kusto-go from 0.5.0 to 0.60
- [#10963](https://github.com/influxdata/telegraf/pull/10963) Update opentelemetry from v0.2.10 to v0.2.17
- [#10984](https://github.com/influxdata/telegraf/pull/10984) Update go.opentelemetry.io/collector/pdata from v0.48.0 to v0.49.0
- [#10998](https://github.com/influxdata/telegraf/pull/10998) Update github.com/aws/aws-sdk-go-v2/config from 1.13.1 to 1.15.3
- [#10997](https://github.com/influxdata/telegraf/pull/10997) Update github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs
- [#10975](https://github.com/influxdata/telegraf/pull/10975) Update github.com/aws/aws-sdk-go-v2/credentials from 1.8.0 to 1.11.2
- [#10981](https://github.com/influxdata/telegraf/pull/10981) Update github.com/containerd/containerd from v1.5.9 to v1.5.11
- [#10973](https://github.com/influxdata/telegraf/pull/10973) Update github.com/miekg/dns from 1.1.46 to 1.1.48
- [#10974](https://github.com/influxdata/telegraf/pull/10974) Update github.com/gopcua/opcua from v0.3.1 to v0.3.3
- [#10972](https://github.com/influxdata/telegraf/pull/10972) Update github.com/aws/aws-sdk-go-v2/service/dynamodb
- [#10773](https://github.com/influxdata/telegraf/pull/10773) Update github.com/xdg/scram from 1.0.3 to 1.0.5
- [#10971](https://github.com/influxdata/telegraf/pull/10971) Update go.mongodb.org/mongo-driver from 1.8.3 to 1.9.0
- [#10940](https://github.com/influxdata/telegraf/pull/10940) Update starlark 7a1108eaa012->d1966c6b9fcd

## v1.22.1 [2022-04-06]

### Bugfixes
Expand All @@ -24,7 +82,6 @@

- [#10462](https://github.com/influxdata/telegraf/pull/10462) `external.psi` Add psi plugin


## v1.22.0

### Influx Line Protocol Parser
Expand Down
2 changes: 2 additions & 0 deletions EXTERNAL_PLUGINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Pull requests welcome.
- [knot](https://github.com/x70b1/telegraf-knot) - Collect stats from Knot DNS.
- [fritzbox](https://github.com/hdecarne-github/fritzbox-telegraf-plugin) - Gather statistics from [FRITZ!Box](https://avm.de/produkte/fritzbox/) router and repeater
- [linux-psi-telegraf-plugin](https://github.com/gridscale/linux-psi-telegraf-plugin) - Gather pressure stall information ([PSI](https://facebookmicrosites.github.io/psi/)) from the Linux Kernel
- [huebridge](https://github.com/hdecarne-github/huebridge-telegraf-plugin) - Gather smart home statistics from [Hue Bridge](https://www.philips-hue.com/) devices

## Outputs

Expand All @@ -38,3 +39,4 @@ Pull requests welcome.
## Processors

- [geoip](https://github.com/a-bali/telegraf-geoip) - Add GeoIP information to IP addresses.
- [metadata](https://github.com/lawdt/metadata) - Appends metadata gathered from Openstack to metrics.
32 changes: 21 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
next_version := $(shell cat build_version.txt)
tag := $(shell git describe --exact-match --tags 2>git_describe_error.tmp; rm -f git_describe_error.tmp)
ifeq ($(OS),Windows_NT)
next_version := $(shell type build_version.txt)
tag := $(shell git describe --exact-match --tags 2> nul)
else
next_version := $(shell cat build_version.txt)
tag := $(shell git describe --exact-match --tags 2>/dev/null)
endif

branch := $(shell git rev-parse --abbrev-ref HEAD)
commit := $(shell git rev-parse --short=8 HEAD)
glibc_version := 2.17
Expand Down Expand Up @@ -109,20 +115,22 @@ versioninfo:
go run scripts/generate_versioninfo/main.go; \
go generate cmd/telegraf/telegraf_windows.go; \

.PHONY: generate
generate:
go generate -run="plugindata/main.go$$" ./plugins/inputs/... ./plugins/outputs/... ./plugins/processors/... ./plugins/aggregators/...
.PHONY: build_generator
build_generator:
go build -o ./tools/readme_config_includer/generator ./tools/readme_config_includer/generator.go

embed_readme_%: build_generator
go generate -run="readme_config_includer/generator$$" ./plugins/$*/...

.PHONY: generate-clean
generate-clean:
go generate -run="plugindata/main.go --clean" ./plugins/inputs/... ./plugins/outputs/... ./plugins/processors/... ./plugins/aggregators/...
.PHONY: generate
generate: embed_readme_inputs embed_readme_outputs embed_readme_processors embed_readme_aggregators

.PHONY: build
build:
go build -ldflags "$(LDFLAGS)" ./cmd/telegraf

.PHONY: telegraf
telegraf: generate build generate-clean
telegraf: generate build

# Used by dockerfile builds
.PHONY: go-install
Expand Down Expand Up @@ -164,7 +172,7 @@ vet:
.PHONY: lint-install
lint-install:
@echo "Installing golangci-lint"
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2

@echo "Installing markdownlint"
npm install -g markdownlint-cli
Expand Down Expand Up @@ -217,6 +225,8 @@ clean:
rm -f telegraf
rm -f telegraf.exe
rm -rf build
rm -rf tools/readme_config_includer/generator
rm -rf tools/readme_config_includer/generator.exe

.PHONY: docker-image
docker-image:
Expand Down Expand Up @@ -323,7 +333,7 @@ darwin-arm64:
include_packages := $(mips) $(mipsel) $(arm64) $(amd64) $(static) $(armel) $(armhf) $(riscv64) $(s390x) $(ppc64le) $(i386) $(windows) $(darwin-amd64) $(darwin-arm64)

.PHONY: package
package: generate $(include_packages) generate-clean
package: generate $(include_packages)

.PHONY: $(include_packages)
$(include_packages):
Expand Down
2 changes: 1 addition & 1 deletion cmd/telegraf/telegraf.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func runAgent(ctx context.Context,
}
}

if !*fTest && len(c.Outputs) == 0 {
if !(*fTest || *fTestWait != 0) && len(c.Outputs) == 0 {
return errors.New("Error: no outputs found, did you provide a valid config file?")
}
if *fPlugins == "" && len(c.Inputs) == 0 {
Expand Down
14 changes: 2 additions & 12 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,8 @@ func printFilteredInputs(inputFilters []string, commented bool) {
// Print Inputs
for _, pname := range pnames {
// Skip inputs that are registered twice for backward compatibility
if pname == "cisco_telemetry_gnmi" {
continue
}
if pname == "KNXListener" {
switch pname {
case "cisco_telemetry_gnmi", "io", "KNXListener":
continue
}
creator := inputs.Inputs[pname]
Expand Down Expand Up @@ -1246,14 +1244,6 @@ func (c *Config) addInput(name string, table *ast.Table) error {
return nil
}

// Legacy support renaming io input to diskio
if name == "io" {
if err := c.printUserDeprecation("inputs", name, nil); err != nil {
return err
}
name = "diskio"
}

// For inputs with parsers we need to compute the set of
// options that is not covered by both, the parser and the input.
// We achieve this by keeping a local book of missing entries
Expand Down
Loading

0 comments on commit 46f220b

Please sign in to comment.