From ade52acc68e37ed35a43304f6a513f96d92c3660 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:34:11 -0800 Subject: [PATCH 01/12] Bump github.com/vmware/govmomi from 0.45.1 to 0.46.2 in /internal/signalfx-agent (#5694) * Bump github.com/vmware/govmomi in /internal/signalfx-agent Bumps [github.com/vmware/govmomi](https://github.com/vmware/govmomi) from 0.45.1 to 0.46.2. - [Release notes](https://github.com/vmware/govmomi/releases) - [Changelog](https://github.com/vmware/govmomi/blob/main/CHANGELOG.md) - [Commits](https://github.com/vmware/govmomi/compare/v0.45.1...v0.46.2) --- updated-dependencies: - dependency-name: github.com/vmware/govmomi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * make tidy --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: release-bot --- go.mod | 2 +- go.sum | 4 ++-- internal/signalfx-agent/go.mod | 2 +- internal/signalfx-agent/go.sum | 4 ++-- pkg/receiver/smartagentreceiver/go.mod | 2 +- pkg/receiver/smartagentreceiver/go.sum | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 30075edf87..2cbcb0ed8f 100644 --- a/go.mod +++ b/go.mod @@ -623,7 +623,7 @@ require ( github.com/tklauser/numcpus v0.7.0 // indirect github.com/ulule/deepcopier v0.0.0-20171107155558-ca99b135e50f // indirect github.com/vjeantet/grok v1.0.1 // indirect - github.com/vmware/govmomi v0.46.0 // indirect + github.com/vmware/govmomi v0.46.2 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect diff --git a/go.sum b/go.sum index b1350e4bce..253156bf60 100644 --- a/go.sum +++ b/go.sum @@ -1809,8 +1809,8 @@ github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXV github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/vjeantet/grok v1.0.1 h1:2rhIR7J4gThTgcZ1m2JY4TrJZNgjn985U28kT2wQrJ4= github.com/vjeantet/grok v1.0.1/go.mod h1:ax1aAchzC6/QMXMcyzHQGZWaW1l195+uMYIkCWPCNIo= -github.com/vmware/govmomi v0.46.0 h1:vKrY5gG8Udz5HGlBYMrmRy03j9Rey+g5q8S3dQIjOyc= -github.com/vmware/govmomi v0.46.0/go.mod h1:uoLVU9zlXC4p4GmLVG+ZJmBC0Gn3Q7mytOJvi39OhxA= +github.com/vmware/govmomi v0.46.2 h1:gZTIcKSr4sVcDB803FUv0r4lhOgE5Y5WQCNW75dPlls= +github.com/vmware/govmomi v0.46.2/go.mod h1:uoLVU9zlXC4p4GmLVG+ZJmBC0Gn3Q7mytOJvi39OhxA= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= diff --git a/internal/signalfx-agent/go.mod b/internal/signalfx-agent/go.mod index 291926f093..4830b1144c 100644 --- a/internal/signalfx-agent/go.mod +++ b/internal/signalfx-agent/go.mod @@ -56,7 +56,7 @@ require ( github.com/snowflakedb/gosnowflake v1.12.0 github.com/stretchr/testify v1.10.0 github.com/ulule/deepcopier v0.0.0-20171107155558-ca99b135e50f - github.com/vmware/govmomi v0.45.1 + github.com/vmware/govmomi v0.46.2 golang.org/x/net v0.30.0 // indirect golang.org/x/sync v0.9.0 golang.org/x/sys v0.27.0 diff --git a/internal/signalfx-agent/go.sum b/internal/signalfx-agent/go.sum index c7ee373927..6f97da8090 100644 --- a/internal/signalfx-agent/go.sum +++ b/internal/signalfx-agent/go.sum @@ -563,8 +563,8 @@ github.com/ulule/deepcopier v0.0.0-20171107155558-ca99b135e50f h1:QatZ4lsJBY3x1+ github.com/ulule/deepcopier v0.0.0-20171107155558-ca99b135e50f/go.mod h1:BNLmYJ8oMJPIPpNx5968jCyUhwEU1XT3YsuOqtbo5qo= github.com/vjeantet/grok v1.0.1 h1:2rhIR7J4gThTgcZ1m2JY4TrJZNgjn985U28kT2wQrJ4= github.com/vjeantet/grok v1.0.1/go.mod h1:ax1aAchzC6/QMXMcyzHQGZWaW1l195+uMYIkCWPCNIo= -github.com/vmware/govmomi v0.45.1 h1:pmMmSUNIw/kePaCRFaUOpDh7IxDfhDi9M4Qh+DRlBV4= -github.com/vmware/govmomi v0.45.1/go.mod h1:uoLVU9zlXC4p4GmLVG+ZJmBC0Gn3Q7mytOJvi39OhxA= +github.com/vmware/govmomi v0.46.2 h1:gZTIcKSr4sVcDB803FUv0r4lhOgE5Y5WQCNW75dPlls= +github.com/vmware/govmomi v0.46.2/go.mod h1:uoLVU9zlXC4p4GmLVG+ZJmBC0Gn3Q7mytOJvi39OhxA= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= diff --git a/pkg/receiver/smartagentreceiver/go.mod b/pkg/receiver/smartagentreceiver/go.mod index 6dfea9d292..5a2a1da76b 100644 --- a/pkg/receiver/smartagentreceiver/go.mod +++ b/pkg/receiver/smartagentreceiver/go.mod @@ -199,7 +199,7 @@ require ( github.com/twmb/murmur3 v1.1.7 // indirect github.com/ulule/deepcopier v0.0.0-20171107155558-ca99b135e50f // indirect github.com/vjeantet/grok v1.0.1 // indirect - github.com/vmware/govmomi v0.45.1 // indirect + github.com/vmware/govmomi v0.46.2 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.114.0 // indirect diff --git a/pkg/receiver/smartagentreceiver/go.sum b/pkg/receiver/smartagentreceiver/go.sum index 4b6623f504..621c2fcb6a 100644 --- a/pkg/receiver/smartagentreceiver/go.sum +++ b/pkg/receiver/smartagentreceiver/go.sum @@ -750,8 +750,8 @@ github.com/ulule/deepcopier v0.0.0-20171107155558-ca99b135e50f h1:QatZ4lsJBY3x1+ github.com/ulule/deepcopier v0.0.0-20171107155558-ca99b135e50f/go.mod h1:BNLmYJ8oMJPIPpNx5968jCyUhwEU1XT3YsuOqtbo5qo= github.com/vjeantet/grok v1.0.1 h1:2rhIR7J4gThTgcZ1m2JY4TrJZNgjn985U28kT2wQrJ4= github.com/vjeantet/grok v1.0.1/go.mod h1:ax1aAchzC6/QMXMcyzHQGZWaW1l195+uMYIkCWPCNIo= -github.com/vmware/govmomi v0.45.1 h1:pmMmSUNIw/kePaCRFaUOpDh7IxDfhDi9M4Qh+DRlBV4= -github.com/vmware/govmomi v0.45.1/go.mod h1:uoLVU9zlXC4p4GmLVG+ZJmBC0Gn3Q7mytOJvi39OhxA= +github.com/vmware/govmomi v0.46.2 h1:gZTIcKSr4sVcDB803FUv0r4lhOgE5Y5WQCNW75dPlls= +github.com/vmware/govmomi v0.46.2/go.mod h1:uoLVU9zlXC4p4GmLVG+ZJmBC0Gn3Q7mytOJvi39OhxA= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= From 9024518ccac81e5e11ed9d7e7a91951017bff74a Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Tue, 10 Dec 2024 18:34:42 -0800 Subject: [PATCH 02/12] Update crazy-max/ghaction-setup-docker gh action (#5693) To close https://github.com/signalfx/splunk-otel-collector/pull/5679 --- .github/workflows/linux-package-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-package-test.yml b/.github/workflows/linux-package-test.yml index ff7a5cbd01..0373cd4389 100644 --- a/.github/workflows/linux-package-test.yml +++ b/.github/workflows/linux-package-test.yml @@ -247,7 +247,7 @@ jobs: # Required to export a multiarch manifest and images to the local image store - name: Set up containerd image store - uses: crazy-max/ghaction-setup-docker@v3 + uses: docker/setup-docker-action@v4 with: daemon-config: | { @@ -320,7 +320,7 @@ jobs: # Required to load a multiarch archive to the local image store - name: Set up containerd image store - uses: crazy-max/ghaction-setup-docker@v3 + uses: docker/setup-docker-action@v4 with: daemon-config: | { From 51a956c4598b56cd459c8d7142a0ab7591a15d22 Mon Sep 17 00:00:00 2001 From: srv-gh-o11y-gdi <98980563+srv-gh-o11y-gdi@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:34:56 -0800 Subject: [PATCH 03/12] Update splunk-otel-javaagent to latest (#5656) Co-authored-by: Dmitrii Anoshin --- instrumentation/packaging/java-agent-release.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/packaging/java-agent-release.txt b/instrumentation/packaging/java-agent-release.txt index f367ae3351..80de12c558 100644 --- a/instrumentation/packaging/java-agent-release.txt +++ b/instrumentation/packaging/java-agent-release.txt @@ -1 +1 @@ -v2.9.0 +v2.10.0 From 06a7c6c732e81a727d6fc3aee29a4c8f174ad77d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:36:35 -0800 Subject: [PATCH 04/12] Bump six from 1.16.0 to 1.17.0 in /packaging/tests (#5676) Bumps [six](https://github.com/benjaminp/six) from 1.16.0 to 1.17.0. - [Changelog](https://github.com/benjaminp/six/blob/main/CHANGES) - [Commits](https://github.com/benjaminp/six/compare/1.16.0...1.17.0) --- updated-dependencies: - dependency-name: six dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packaging/tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/tests/requirements.txt b/packaging/tests/requirements.txt index 14083742b5..d4c543a149 100644 --- a/packaging/tests/requirements.txt +++ b/packaging/tests/requirements.txt @@ -6,6 +6,6 @@ pytest-html==4.1.1 pytest-xdist==3.6.1 py>=1.8.2 requests<2.33.0 -six==1.16.0 +six==1.17.0 urllib3<3 pyyaml==6.0.2 \ No newline at end of file From 0a726ee8441a5322521f9282bc95ba20047e51b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:36:54 -0800 Subject: [PATCH 05/12] Bump golang.org/x/sys from 0.27.0 to 0.28.0 in /tests (#5681) * Bump golang.org/x/sys from 0.27.0 to 0.28.0 in /tests Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.27.0 to 0.28.0. - [Commits](https://github.com/golang/sys/compare/v0.27.0...v0.28.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * make tidy --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: release-bot --- tests/go.mod | 2 +- tests/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/go.mod b/tests/go.mod index 60dd5437a1..e1706fb58a 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -33,7 +33,7 @@ require ( go.uber.org/atomic v1.11.0 go.uber.org/zap v1.27.0 golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 - golang.org/x/sys v0.27.0 + golang.org/x/sys v0.28.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/tests/go.sum b/tests/go.sum index ea5d46bac2..24073f5c0c 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -549,8 +549,8 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= From 1e4833e6c4e0cdca627e3b2806fc390ae9959f97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:52:24 -0800 Subject: [PATCH 06/12] Bump google.golang.org/grpc from 1.67.1 to 1.68.1 in /internal/signalfx-agent (#5700) * Bump google.golang.org/grpc in /internal/signalfx-agent Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.67.1 to 1.68.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.67.1...v1.68.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * make tidy --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: release-bot --- go.mod | 4 ++-- go.sum | 8 ++++---- internal/signalfx-agent/go.mod | 2 +- internal/signalfx-agent/go.sum | 4 ++-- pkg/extension/smartagentextension/go.mod | 2 +- pkg/extension/smartagentextension/go.sum | 4 ++-- pkg/receiver/smartagentreceiver/go.mod | 2 +- pkg/receiver/smartagentreceiver/go.sum | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 2cbcb0ed8f..b8deebd6fe 100644 --- a/go.mod +++ b/go.mod @@ -208,7 +208,7 @@ require ( github.com/blang/semver/v4 v4.0.0 // indirect github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect github.com/circonus-labs/circonusllhist v0.1.5 // indirect - github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59 // indirect + github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 // indirect github.com/containerd/containerd/api v1.7.19 // indirect github.com/containerd/errdefs v0.1.0 // indirect github.com/containerd/log v0.1.0 // indirect @@ -656,7 +656,7 @@ require ( golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect gonum.org/v1/gonum v0.15.1 // indirect google.golang.org/api v0.205.0 // indirect - google.golang.org/grpc v1.67.1 // indirect + google.golang.org/grpc v1.68.1 // indirect google.golang.org/protobuf v1.35.2 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/go-playground/validator.v9 v9.31.0 // indirect diff --git a/go.sum b/go.sum index 253156bf60..06b9413e5e 100644 --- a/go.sum +++ b/go.sum @@ -349,8 +349,8 @@ github.com/cloudfoundry/loggregatorlib v0.0.0-20170823162133-36eddf15ef12/go.mod github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4/go.mod h1:GS0pCHd7onIsewbw8Ue9qa9pZPv2V88cUZDttK6KzgI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59 h1:fLZ97KE86ELjEYJCEUVzmbhfzDxHHGwBrDVMd4XL6Bs= -github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 h1:QVw89YDxXxEe+l8gU8ETbOasdwEV+avkR75ZzsVV9WI= +github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/containerd/containerd/api v1.7.19 h1:VWbJL+8Ap4Ju2mx9c9qS1uFSB1OVYr5JJrW2yT5vFoA= @@ -2481,8 +2481,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= +google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/internal/signalfx-agent/go.mod b/internal/signalfx-agent/go.mod index 4830b1144c..eb6cf760b1 100644 --- a/internal/signalfx-agent/go.mod +++ b/internal/signalfx-agent/go.mod @@ -61,7 +61,7 @@ require ( golang.org/x/sync v0.9.0 golang.org/x/sys v0.27.0 golang.org/x/tools v0.24.0 // indirect - google.golang.org/grpc v1.67.1 + google.golang.org/grpc v1.68.1 gopkg.in/go-playground/validator.v9 v9.31.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.29.3 diff --git a/internal/signalfx-agent/go.sum b/internal/signalfx-agent/go.sum index 6f97da8090..0e412df074 100644 --- a/internal/signalfx-agent/go.sum +++ b/internal/signalfx-agent/go.sum @@ -754,8 +754,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc= google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= +google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/pkg/extension/smartagentextension/go.mod b/pkg/extension/smartagentextension/go.mod index 63c2288a85..21109b9da5 100644 --- a/pkg/extension/smartagentextension/go.mod +++ b/pkg/extension/smartagentextension/go.mod @@ -52,7 +52,7 @@ require ( golang.org/x/sys v0.27.0 // indirect golang.org/x/text v0.19.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect - google.golang.org/grpc v1.67.1 // indirect + google.golang.org/grpc v1.68.1 // indirect google.golang.org/protobuf v1.35.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/extension/smartagentextension/go.sum b/pkg/extension/smartagentextension/go.sum index 2441eb9eca..af4e36d15d 100644 --- a/pkg/extension/smartagentextension/go.sum +++ b/pkg/extension/smartagentextension/go.sum @@ -443,8 +443,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= +google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/pkg/receiver/smartagentreceiver/go.mod b/pkg/receiver/smartagentreceiver/go.mod index 5a2a1da76b..491cf59b51 100644 --- a/pkg/receiver/smartagentreceiver/go.mod +++ b/pkg/receiver/smartagentreceiver/go.mod @@ -229,7 +229,7 @@ require ( golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect - google.golang.org/grpc v1.67.1 // indirect + google.golang.org/grpc v1.68.1 // indirect google.golang.org/protobuf v1.35.2 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/go-playground/validator.v9 v9.31.0 // indirect diff --git a/pkg/receiver/smartagentreceiver/go.sum b/pkg/receiver/smartagentreceiver/go.sum index 621c2fcb6a..8b96aa633a 100644 --- a/pkg/receiver/smartagentreceiver/go.sum +++ b/pkg/receiver/smartagentreceiver/go.sum @@ -1047,8 +1047,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= +google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 4a7e59c9fca4a7072796b9e3f652a171c0452620 Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Wed, 11 Dec 2024 17:24:24 -0800 Subject: [PATCH 07/12] [chore] Fix chef tests (#5699) --- deployments/chef/test/integration/default/test.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/deployments/chef/test/integration/default/test.rb b/deployments/chef/test/integration/default/test.rb index 5395f91b4c..ab85c568be 100644 --- a/deployments/chef/test/integration/default/test.rb +++ b/deployments/chef/test/integration/default/test.rb @@ -26,7 +26,6 @@ { name: 'SPLUNK_INGEST_URL', type: :string, data: splunk_ingest_url }, { name: 'SPLUNK_MEMORY_TOTAL_MIB', type: :string, data: splunk_memory_total }, { name: 'SPLUNK_REALM', type: :string, data: splunk_realm }, - { name: 'SPLUNK_TRACE_URL', type: :string, data: "#{splunk_ingest_url}/v2/trace" }, ] collector_env_vars_strings = [] From 60befdb9fa7c4a28d4cf54369f5bb1ec4008dd41 Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Thu, 12 Dec 2024 12:06:08 -0800 Subject: [PATCH 08/12] [docs] [chore] Update GitHub CI link in Zeroconfig tests doc (#5703) --- tests/zeroconfig/windows/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/zeroconfig/windows/README.md b/tests/zeroconfig/windows/README.md index 24bcfb7504..9ea01562b1 100644 --- a/tests/zeroconfig/windows/README.md +++ b/tests/zeroconfig/windows/README.md @@ -6,7 +6,7 @@ a deployment following the Zero Configuration procedures. ## Requirements to run the tests locally -The GitHub job `dotnet-zeroconfig-e2e-test` in the [`build-and-test`](../../../.github/workflows/build-and-test.yml) +The GitHub job `dotnet-zeroconfig-e2e-test` in the [`win-package-test`](../../../.github/workflows/win-package-test.yml) has the actual requirements to run the tests locally, overall one needs: - Set up the [`./testdata/docker-setup`](./testdata/docker-setup) folder by adding: From cca5c0d6e53cdd65ea0571e5f250a134817e0408 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Thu, 12 Dec 2024 13:56:24 -0800 Subject: [PATCH 09/12] Deprecate genericjmx and all downstream monitors (#5539) Co-authored-by: Paulo Janotti --- CHANGELOG.md | 12 ++++++++++++ .../pkg/monitors/collectd/activemq/metadata.yaml | 2 ++ .../pkg/monitors/collectd/cassandra/metadata.yaml | 2 ++ .../pkg/monitors/collectd/genericjmx/genericjmx.go | 2 +- .../pkg/monitors/collectd/genericjmx/metadata.yaml | 2 ++ .../pkg/monitors/collectd/hadoop/hadoop.go | 1 + .../pkg/monitors/collectd/hadoop/metadata.yaml | 2 ++ .../pkg/monitors/collectd/hadoopjmx/metadata.yaml | 2 ++ .../pkg/monitors/collectd/kafka/metadata.yaml | 2 ++ .../monitors/collectd/kafkaconsumer/metadata.yaml | 2 ++ .../monitors/collectd/kafkaproducer/metadata.yaml | 2 ++ .../pkg/monitors/collectd/solr/metadata.yaml | 2 ++ .../pkg/monitors/collectd/tomcat/metadata.yaml | 2 ++ 13 files changed, 34 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9b8a89425..e82c0afeb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ ## Unreleased +### 🚩Deprecations 🚩 + +- (Splunk) Deprecate the collectd/genericjmx monitor. Please use the [jmxreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver) instead. ([#5539](https://github.com/signalfx/splunk-otel-collector/pull/5539)) +- (Splunk) Deprecate the collectd/activemq monitor. Please use the [jmxreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver) with the activemq target system instead. ([#5539](https://github.com/signalfx/splunk-otel-collector/pull/5539)) +- (Splunk) Deprecate the collectd/cassandra monitor. Please use the [jmxreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver) with the cassandra target system instead. ([#5539](https://github.com/signalfx/splunk-otel-collector/pull/5539)) +- (Splunk) Deprecate the collectd/hadoop monitor. Please use the [jmxreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver) with the hadoop target system instead. ([#5539](https://github.com/signalfx/splunk-otel-collector/pull/5539)) +- (Splunk) Deprecate the collectd/kafka monitor. Please use the [jmxreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver) with the kafka target system instead. ([#5539](https://github.com/signalfx/splunk-otel-collector/pull/5539)) +- (Splunk) Deprecate the collectd/kafka-consumer monitor. Please use the [jmxreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver) with the kafka-consumer target system instead. ([#5539](https://github.com/signalfx/splunk-otel-collector/pull/5539)) +- (Splunk) Deprecate the collectd/kafka-producer monitor. Please use the [jmxreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver) with the kafka-producer target system instead. ([#5539](https://github.com/signalfx/splunk-otel-collector/pull/5539)) +- (Splunk) Deprecate the collectd/solr monitor. Please use the [jmxreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver) with the solr target system instead. ([#5539](https://github.com/signalfx/splunk-otel-collector/pull/5539)) +- (Splunk) Deprecate the collectd/tomcat monitor. Please use the [jmxreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver) with the tomcat target system instead. ([#5539](https://github.com/signalfx/splunk-otel-collector/pull/5539)) + ## v0.114.0 ### 💡 Enhancements 💡 diff --git a/internal/signalfx-agent/pkg/monitors/collectd/activemq/metadata.yaml b/internal/signalfx-agent/pkg/monitors/collectd/activemq/metadata.yaml index 8c9abda4bf..74327a4d28 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/activemq/metadata.yaml +++ b/internal/signalfx-agent/pkg/monitors/collectd/activemq/metadata.yaml @@ -1,6 +1,8 @@ monitors: - dimensions: doc: | + **The collectd/activemq monitor is deprecated. Use the jmxreceiver with the activemq target system instead.** + SignalFx's integration with ActiveMQ wraps the [Collectd GenericJMX monitor](https://docs.splunk.com/observability/gdi/genericjmx/genericjmx.html) to monitor ActiveMQ. diff --git a/internal/signalfx-agent/pkg/monitors/collectd/cassandra/metadata.yaml b/internal/signalfx-agent/pkg/monitors/collectd/cassandra/metadata.yaml index 72e484b7cd..313f39218a 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/cassandra/metadata.yaml +++ b/internal/signalfx-agent/pkg/monitors/collectd/cassandra/metadata.yaml @@ -1,6 +1,8 @@ monitors: - dimensions: doc: | + **The collectd/cassandra monitor is deprecated. Use the jmxreceiver with the cassandra target system instead.** + Monitors Cassandra using the Collectd GenericJMX plugin. This is essentially a wrapper around the [collectd-genericjmx](./collectd-genericjmx.md)[](sfx_link:java) monitor that comes with a diff --git a/internal/signalfx-agent/pkg/monitors/collectd/genericjmx/genericjmx.go b/internal/signalfx-agent/pkg/monitors/collectd/genericjmx/genericjmx.go index da04127d0b..08038a169a 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/genericjmx/genericjmx.go +++ b/internal/signalfx-agent/pkg/monitors/collectd/genericjmx/genericjmx.go @@ -102,5 +102,5 @@ func (m *JMXMonitorCore) Configure(conf *Config) error { conf.ServiceName = m.defaultServiceName } - return m.SetConfigurationAndRun(conf) + return m.SetConfigurationAndRun(conf, collectd.WithDeprecationWarningLog("jmxreceiver")) } diff --git a/internal/signalfx-agent/pkg/monitors/collectd/genericjmx/metadata.yaml b/internal/signalfx-agent/pkg/monitors/collectd/genericjmx/metadata.yaml index 10fae99076..a40bce0d88 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/genericjmx/metadata.yaml +++ b/internal/signalfx-agent/pkg/monitors/collectd/genericjmx/metadata.yaml @@ -1,6 +1,8 @@ monitors: - dimensions: doc: | + **The collectd/genericjmx monitor is deprecated. Use the jmxreceiver instead.** + Monitors Java services that expose metrics on JMX using collectd's GenericJMX plugin. The GenericJMX plugin reads Managed Beans (MBeans) from an MBeanServer using JMX. The monitor uses an embedded Java runtime in diff --git a/internal/signalfx-agent/pkg/monitors/collectd/hadoop/hadoop.go b/internal/signalfx-agent/pkg/monitors/collectd/hadoop/hadoop.go index 681a860bbe..629aa36a20 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/hadoop/hadoop.go +++ b/internal/signalfx-agent/pkg/monitors/collectd/hadoop/hadoop.go @@ -62,6 +62,7 @@ func (m *Monitor) Configure(conf *Config) error { "Verbose": conf.Verbose, }, } + m.Logger().Warn("[NOTICE] the collectd/hadoop monitor is deprecated. Use the jmxreceiver instead") return m.PyMonitor.Configure(conf) } diff --git a/internal/signalfx-agent/pkg/monitors/collectd/hadoop/metadata.yaml b/internal/signalfx-agent/pkg/monitors/collectd/hadoop/metadata.yaml index 074a6436f0..86941a0653 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/hadoop/metadata.yaml +++ b/internal/signalfx-agent/pkg/monitors/collectd/hadoop/metadata.yaml @@ -1,6 +1,8 @@ monitors: - dimensions: doc: | + **The collectd/hadoop monitor is deprecated. Use the jmxreceiver with the hadoop target system instead.** + Collects metrics about a Hadoop 2.0+ cluster using the [collectd Hadoop Python plugin](https://github.com/signalfx/collectd-hadoop). If a remote JMX port is exposed in the hadoop cluster, then you may also configure the diff --git a/internal/signalfx-agent/pkg/monitors/collectd/hadoopjmx/metadata.yaml b/internal/signalfx-agent/pkg/monitors/collectd/hadoopjmx/metadata.yaml index 0d429cb2b3..28b491af05 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/hadoopjmx/metadata.yaml +++ b/internal/signalfx-agent/pkg/monitors/collectd/hadoopjmx/metadata.yaml @@ -1,6 +1,8 @@ monitors: - dimensions: doc: | + **The collectd/hadoopjmx monitor is deprecated. Use the jmxreceiver with the hadoop target system instead.** + Collects metrics about a Hadoop 2.0+ cluster using using collectd's GenericJMX plugin. You may also configure the [collectd/hadoop](https://github.com/signalfx/signalfx-agent/tree/main/docs/monitors/collectd-hadoop.md) diff --git a/internal/signalfx-agent/pkg/monitors/collectd/kafka/metadata.yaml b/internal/signalfx-agent/pkg/monitors/collectd/kafka/metadata.yaml index 3dbc1d31e7..a892e1340c 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/kafka/metadata.yaml +++ b/internal/signalfx-agent/pkg/monitors/collectd/kafka/metadata.yaml @@ -1,6 +1,8 @@ monitors: - dimensions: doc: | + **The collectd/kafka monitor is deprecated. Use the jmxreceiver with the kafka target system instead.** + Monitors a Kafka instance using collectd's GenericJMX plugin. See the [collectd/genericjmx monitor](./collectd-genericjmx.md)[](sfx_link:java) for more information on diff --git a/internal/signalfx-agent/pkg/monitors/collectd/kafkaconsumer/metadata.yaml b/internal/signalfx-agent/pkg/monitors/collectd/kafkaconsumer/metadata.yaml index 3f78bf68ab..423d7ca617 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/kafkaconsumer/metadata.yaml +++ b/internal/signalfx-agent/pkg/monitors/collectd/kafkaconsumer/metadata.yaml @@ -1,6 +1,8 @@ monitors: - dimensions: doc: | + **The collectd/kafkaconsumer monitor is deprecated. Use the jmxreceiver with the kafka-consumer target system instead.** + Monitors a Java based Kafka consumer using [collectd's GenericJMX plugin](./collectd-genericjmx.md)[](sfx_link:java). This monitor has a set of [built in MBeans diff --git a/internal/signalfx-agent/pkg/monitors/collectd/kafkaproducer/metadata.yaml b/internal/signalfx-agent/pkg/monitors/collectd/kafkaproducer/metadata.yaml index 648739ecaf..4e76763a7f 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/kafkaproducer/metadata.yaml +++ b/internal/signalfx-agent/pkg/monitors/collectd/kafkaproducer/metadata.yaml @@ -1,6 +1,8 @@ monitors: - dimensions: doc: | + **The collectd/kafkaproducer monitor is deprecated. Use the jmxreceiver with the kafka-producer target system instead.** + Monitors a Java based Kafka producer using GenericJMX. This monitor has a set of [built in MBeans diff --git a/internal/signalfx-agent/pkg/monitors/collectd/solr/metadata.yaml b/internal/signalfx-agent/pkg/monitors/collectd/solr/metadata.yaml index f3ad091c65..2d0457c515 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/solr/metadata.yaml +++ b/internal/signalfx-agent/pkg/monitors/collectd/solr/metadata.yaml @@ -1,6 +1,8 @@ monitors: - dimensions: doc: | + **The collectd/solr monitor is deprecated. Use the jmxreceiver with the solr target system instead.** + Monitors Solr instances by using the [collectd Solr plugin](https://github.com/signalfx/collectd-solr). Supports Solr 6.6 and later. diff --git a/internal/signalfx-agent/pkg/monitors/collectd/tomcat/metadata.yaml b/internal/signalfx-agent/pkg/monitors/collectd/tomcat/metadata.yaml index 5f2e201c3d..bdd7a6ae3d 100644 --- a/internal/signalfx-agent/pkg/monitors/collectd/tomcat/metadata.yaml +++ b/internal/signalfx-agent/pkg/monitors/collectd/tomcat/metadata.yaml @@ -1,6 +1,8 @@ monitors: - dimensions: doc: | + **The collectd/tomcat monitor is deprecated. Use the jmxreceiver with the tomcat target system instead.** + Monitors Tomcat using the Collectd GenericJMX plugin. This is essentially a wrapper around the [collectd-genericjmx](./collectd-genericjmx.md)[](sfx_link:java) monitor that comes with a set of predefined MBean definitions that a standard Tomcat deployment will expose. From e172128984c755d25af7a16ad5e0c092f3bdc67e Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Thu, 12 Dec 2024 14:48:04 -0800 Subject: [PATCH 10/12] Move NGINX discovery to OTel receiver (#5689) * Initial changes to move NGINX discovery to OTel receiver * Initial changes to add discovery test * Fix typo * fix discovery endpoint * Fix typo * Add changelog entry * Remove smartagent-collectd-nginx generated file * Small README.md fix --- .github/workflows/integration-test.yml | 2 +- CHANGELOG.md | 5 ++ Makefile | 4 ++ .../properties.discovery.yaml.example | 4 +- .../receivers/nginx.discovery.yaml | 26 ++++++++++ docker/docker-compose.yml | 2 +- internal/confmapprovider/discovery/README.md | 2 +- ...nx.discovery.yaml => nginx.discovery.yaml} | 18 +++---- .../receivers/nginx.discovery.yaml.tmpl | 18 +++++++ ...rtagent-collectd-nginx.discovery.yaml.tmpl | 24 --------- .../discovery/bundle/bundle_gen.go | 4 +- .../discovery/bundle/bundledfs_other_test.go | 2 +- .../discovery/bundle/bundledfs_others.go | 2 +- .../discovery/bundle/components.go | 2 +- tests/receivers/nginx/nginx_discovery_test.go | 51 +++++++++++++++++++ .../docker_observer_nginx_config.yaml | 50 ++++++++++++++++++ 16 files changed, 170 insertions(+), 46 deletions(-) create mode 100644 cmd/otelcol/config/collector/config.d.linux/receivers/nginx.discovery.yaml rename internal/confmapprovider/discovery/bundle/bundle.d/receivers/{smartagent-collectd-nginx.discovery.yaml => nginx.discovery.yaml} (57%) create mode 100644 internal/confmapprovider/discovery/bundle/bundle.d/receivers/nginx.discovery.yaml.tmpl delete mode 100644 internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml.tmpl create mode 100644 tests/receivers/nginx/nginx_discovery_test.go create mode 100644 tests/receivers/nginx/testdata/docker_observer_nginx_config.yaml diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index b18b4a0e97..1a8c2db142 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -338,7 +338,7 @@ jobs: id: get-matrix run: | includes="" - for service in "apache" "mongodb" "kafkametrics" "jmx/cassandra"; do + for service in "apache" "jmx/cassandra" "kafkametrics" "mongodb" "nginx"; do for arch in "amd64" "arm64"; do if [ "$service" = "mongodb" ]; then # tests for mongo "6.0" and "7.0" are flaky, skipping for now diff --git a/CHANGELOG.md b/CHANGELOG.md index e82c0afeb4..7a82c29e1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +### 💡 Enhancements 💡 + +- (Splunk) Automatic Discovery: + - Switch bundled NGINX discovery to create [OpenTelemetry NGINX receiver](https://docs.splunk.com/observability/en/gdi/opentelemetry/components/nginx-receiver.html#nginx-receiver) instead of the Smart Agent NGINX monitor ([#5689](https://github.com/signalfx/splunk-otel-collector/pull/5689)) + ### 🚩Deprecations 🚩 - (Splunk) Deprecate the collectd/genericjmx monitor. Please use the [jmxreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver) instead. ([#5539](https://github.com/signalfx/splunk-otel-collector/pull/5539)) diff --git a/Makefile b/Makefile index 717eefdece..18349e2fff 100644 --- a/Makefile +++ b/Makefile @@ -103,6 +103,10 @@ integration-test-jmx/cassandra-discovery: integration-test-apache-discovery: @set -e; cd tests && $(GOTEST_SERIAL) $(BUILD_INFO_TESTS) --tags=discovery_integration_apachewebserver -v -timeout 5m -count 1 ./... +.PHONY: integration-test-nginx-discovery +integration-test-nginx-discovery: + @set -e; cd tests && $(GOTEST_SERIAL) $(BUILD_INFO_TESTS) --tags=discovery_integration_nginx -v -timeout 5m -count 1 ./... + .PHONY: smartagent-integration-test smartagent-integration-test: @set -e; cd tests && $(GOTEST_SERIAL) $(BUILD_INFO_TESTS) --tags=smartagent_integration -v -timeout 5m -count 1 ./... diff --git a/cmd/otelcol/config/collector/config.d.linux/properties.discovery.yaml.example b/cmd/otelcol/config/collector/config.d.linux/properties.discovery.yaml.example index 2a37f92406..65a0891e88 100644 --- a/cmd/otelcol/config/collector/config.d.linux/properties.discovery.yaml.example +++ b/cmd/otelcol/config/collector/config.d.linux/properties.discovery.yaml.example @@ -13,11 +13,11 @@ splunk.discovery: receivers: mysql: enabled: true + nginx: + enabled: true postgresql: enabled: true smartagent/collectd/mysql: enabled: false - smartagent/collectd/nginx: - enabled: true smartagent/postgresql: enabled: false \ No newline at end of file diff --git a/cmd/otelcol/config/collector/config.d.linux/receivers/nginx.discovery.yaml b/cmd/otelcol/config/collector/config.d.linux/receivers/nginx.discovery.yaml new file mode 100644 index 0000000000..d919d80fcb --- /dev/null +++ b/cmd/otelcol/config/collector/config.d.linux/receivers/nginx.discovery.yaml @@ -0,0 +1,26 @@ +##################################################################################### +# This file is generated by the Splunk Distribution of the OpenTelemetry Collector. # +# # +# It reflects the default configuration bundled in the Collector executable for use # +# in discovery mode (--discovery) and is provided for reference or customization. # +# Please note that any changes made to this file will need to be reconciled during # +# upgrades of the Collector. # +##################################################################################### +# nginx: +# enabled: true +# rule: +# docker_observer: type == "container" and any([name, image, command], {# matches "(?i)nginx"}) and not (command matches "splunk.discovery") +# host_observer: type == "hostport" and command matches "(?i)nginx" and not (command matches "splunk.discovery") +# k8s_observer: type == "port" and pod.name matches "(?i)nginx" +# config: +# default: +# endpoint: '`(port in [443] ? "https://" : "http://")``endpoint`/nginx_status}}' +# status: +# metrics: +# - status: successful +# strict: nginx.connections_accepted +# message: nginx receiver is working! +# statements: +# - status: failed +# regexp: "Failed to fetch nginx stats" +# message: Failed to retrieve metrics from NGINX stub_status endpoint. diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index e011f29976..61e090f1d0 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -245,11 +245,11 @@ services: build: ./mysql ports: - "3306:3306" - # Nginx image for collectd-nginx test: nginx: image: quay.io/splunko11ytest/nginx:latest profiles: - integration + - integration-test-nginx-discovery - smartagent build: ./nginx ports: diff --git a/internal/confmapprovider/discovery/README.md b/internal/confmapprovider/discovery/README.md index 25824d9b5e..332c282616 100644 --- a/internal/confmapprovider/discovery/README.md +++ b/internal/confmapprovider/discovery/README.md @@ -138,11 +138,11 @@ The following components have bundled discovery configurations in the last Splun I. Receivers * `mongodb` ([Linux and Windows](./bundle/bundle.d/receivers/mongodb.discovery.yaml)) * `mysql` ([Linux and Windows](./bundle/bundle.d/receivers/mysql.discovery.yaml)) +* `nginx` ([Linux and Windows](./bundle/bundle.d/receivers/nginx.discovery.yaml)) * `oracledb` ([Linux and Windows](./bundle/bundle.d/receivers/oracledb.discovery.yaml)) * `postgresql` ([Linux and Windows](./bundle/bundle.d/receivers/postgresql.discovery.yaml)) * `redis` ([Linux and Windows](./bundle/bundle.d/receivers/redis.discovery.yaml)) * `smartagent` with `collectd/mysql` monitor type ([Linux](./bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml)) -* `smartagent` with `collectd/nginx` monitor type ([Linux](./bundle/bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml)) * `smartagent` with `postgresql` monitor type ([Linux and Windows](./bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml)) * `sqlserver` ([Linux And Windows](./bundle/bundle.d/receivers/sqlserver.discovery.yaml)) diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/nginx.discovery.yaml similarity index 57% rename from internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml rename to internal/confmapprovider/discovery/bundle/bundle.d/receivers/nginx.discovery.yaml index 87e6d2ee12..45290edeff 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/nginx.discovery.yaml @@ -2,7 +2,7 @@ # Do not edit manually! # # All changes must be made to associated .tmpl file before running 'make bundle.d'. # ##################################################################################### -smartagent/collectd/nginx: +nginx: enabled: true rule: docker_observer: type == "container" and any([name, image, command], {# matches "(?i)nginx"}) and not (command matches "splunk.discovery") @@ -10,19 +10,13 @@ smartagent/collectd/nginx: k8s_observer: type == "port" and pod.name matches "(?i)nginx" config: default: - type: collectd/nginx - url: '`(port in [443, 8443] ? "https" : "http") + "://{{.Host}}:{{.Port}}/nginx_status"`' - timeout: 5000 - isolatedCollectd: true + endpoint: '`(port in [443] ? "https://" : "http://")``endpoint`/nginx_status}}' status: metrics: - status: successful - strict: connections.accepted - message: smartagent/collectd/nginx receiver is working! + strict: nginx.connections_accepted + message: nginx receiver is working! statements: - status: failed - regexp: "nginx plugin: curl_easy_perform failed: Operation timed out after" - message: The container is not serving http connections. - - status: failed - regexp: "read-function of plugin .* failed" - message: The integration is unable to read metrics from this endpoint. + regexp: "Failed to fetch nginx stats" + message: Failed to retrieve metrics from NGINX stub_status endpoint. diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/nginx.discovery.yaml.tmpl b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/nginx.discovery.yaml.tmpl new file mode 100644 index 0000000000..86a70b5349 --- /dev/null +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/nginx.discovery.yaml.tmpl @@ -0,0 +1,18 @@ +{{ receiver "nginx" }}: + enabled: true + rule: + docker_observer: type == "container" and any([name, image, command], {# matches "(?i)nginx"}) and not (command matches "splunk.discovery") + host_observer: type == "hostport" and command matches "(?i)nginx" and not (command matches "splunk.discovery") + k8s_observer: type == "port" and pod.name matches "(?i)nginx" + config: + default: + endpoint: '`(port in [443] ? "https://" : "http://")``endpoint`/nginx_status}}' + status: + metrics: + - status: successful + strict: nginx.connections_accepted + message: nginx receiver is working! + statements: + - status: failed + regexp: "Failed to fetch nginx stats" + message: Failed to retrieve metrics from NGINX stub_status endpoint. diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml.tmpl b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml.tmpl deleted file mode 100644 index 6adc2deeb2..0000000000 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -{{ receiver "smartagent/collectd/nginx" }}: - enabled: true - rule: - docker_observer: type == "container" and any([name, image, command], {# matches "(?i)nginx"}) and not (command matches "splunk.discovery") - host_observer: type == "hostport" and command matches "(?i)nginx" and not (command matches "splunk.discovery") - k8s_observer: type == "port" and pod.name matches "(?i)nginx" - config: - default: - type: collectd/nginx - url: '`(port in [443, 8443] ? "https" : "http") + "{{`://{{.Host}}:{{.Port}}/nginx_status`}}"`' - timeout: 5000 - isolatedCollectd: true - status: - metrics: - - status: successful - strict: connections.accepted - message: smartagent/collectd/nginx receiver is working! - statements: - - status: failed - regexp: "nginx plugin: curl_easy_perform failed: Operation timed out after" - message: The container is not serving http connections. - - status: failed - regexp: "read-function of plugin .* failed" - message: The integration is unable to read metrics from this endpoint. diff --git a/internal/confmapprovider/discovery/bundle/bundle_gen.go b/internal/confmapprovider/discovery/bundle/bundle_gen.go index 1763646e22..15e4a241a2 100644 --- a/internal/confmapprovider/discovery/bundle/bundle_gen.go +++ b/internal/confmapprovider/discovery/bundle/bundle_gen.go @@ -33,6 +33,8 @@ //go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/mongodb.discovery.yaml.tmpl //go:generate discoverybundler --render --template bundle.d/receivers/mysql.discovery.yaml.tmpl //go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/mysql.discovery.yaml.tmpl +//go:generate discoverybundler --render --template bundle.d/receivers/nginx.discovery.yaml.tmpl +//go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/nginx.discovery.yaml.tmpl //go:generate discoverybundler --render --template bundle.d/receivers/oracledb.discovery.yaml.tmpl //go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/oracledb.discovery.yaml.tmpl //go:generate discoverybundler --render --template bundle.d/receivers/postgresql.discovery.yaml.tmpl @@ -43,8 +45,6 @@ //go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/redis.discovery.yaml.tmpl //go:generate discoverybundler --render --template bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl //go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl -//go:generate discoverybundler --render --template bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml.tmpl -//go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml.tmpl //go:generate discoverybundler --render --template bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl //go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl //go:generate discoverybundler --render --template bundle.d/receivers/sqlserver.discovery.yaml.tmpl diff --git a/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go b/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go index dffd2b7d69..efe3c5320e 100644 --- a/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go +++ b/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go @@ -32,12 +32,12 @@ func TestBundleDir(t *testing.T) { "bundle.d/receivers/kafkametrics.discovery.yaml", "bundle.d/receivers/mongodb.discovery.yaml", "bundle.d/receivers/mysql.discovery.yaml", + "bundle.d/receivers/nginx.discovery.yaml", "bundle.d/receivers/oracledb.discovery.yaml", "bundle.d/receivers/postgresql.discovery.yaml", "bundle.d/receivers/rabbitmq.discovery.yaml", "bundle.d/receivers/redis.discovery.yaml", "bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml", - "bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml", "bundle.d/receivers/smartagent-postgresql.discovery.yaml", "bundle.d/receivers/sqlserver.discovery.yaml", }, receivers) diff --git a/internal/confmapprovider/discovery/bundle/bundledfs_others.go b/internal/confmapprovider/discovery/bundle/bundledfs_others.go index 3ed2493589..f69627a056 100644 --- a/internal/confmapprovider/discovery/bundle/bundledfs_others.go +++ b/internal/confmapprovider/discovery/bundle/bundledfs_others.go @@ -30,12 +30,12 @@ import ( //go:embed bundle.d/receivers/kafkametrics.discovery.yaml //go:embed bundle.d/receivers/mongodb.discovery.yaml //go:embed bundle.d/receivers/mysql.discovery.yaml +//go:embed bundle.d/receivers/nginx.discovery.yaml //go:embed bundle.d/receivers/oracledb.discovery.yaml //go:embed bundle.d/receivers/postgresql.discovery.yaml //go:embed bundle.d/receivers/rabbitmq.discovery.yaml //go:embed bundle.d/receivers/redis.discovery.yaml //go:embed bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml -//go:embed bundle.d/receivers/smartagent-collectd-nginx.discovery.yaml //go:embed bundle.d/receivers/smartagent-postgresql.discovery.yaml //go:embed bundle.d/receivers/sqlserver.discovery.yaml var BundledFS embed.FS diff --git a/internal/confmapprovider/discovery/bundle/components.go b/internal/confmapprovider/discovery/bundle/components.go index f6e0d801b1..2a231d7702 100644 --- a/internal/confmapprovider/discovery/bundle/components.go +++ b/internal/confmapprovider/discovery/bundle/components.go @@ -36,12 +36,12 @@ var ( "kafkametrics", "mongodb", "mysql", + "nginx", "oracledb", "postgresql", "rabbitmq", "redis", "smartagent-collectd-mysql", - "smartagent-collectd-nginx", "smartagent-postgresql", "sqlserver", } diff --git a/tests/receivers/nginx/nginx_discovery_test.go b/tests/receivers/nginx/nginx_discovery_test.go new file mode 100644 index 0000000000..9d8e69d826 --- /dev/null +++ b/tests/receivers/nginx/nginx_discovery_test.go @@ -0,0 +1,51 @@ +// Copyright Splunk, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build discovery_integration_nginx + +package tests + +import ( + "path/filepath" + "runtime" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/signalfx/splunk-otel-collector/tests/internal/discoverytest" +) + +func TestIntegrationNGINXAutoDiscovery(t *testing.T) { + if runtime.GOOS == "darwin" || runtime.GOOS == "windows" { + t.Skip("Integration tests are only run on linux architecture: https://github.com/signalfx/splunk-otel-collector/blob/main/.github/workflows/integration-test.yml#L35") + } + + tests := map[string]struct { + configFileName string + logMessageToAssert string + }{ + "Successful Discovery test": { + configFileName: "docker_observer_nginx_config.yaml", + logMessageToAssert: `nginx receiver is working!`, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + otelConfigPath, err := filepath.Abs(filepath.Join(".", "testdata", test.configFileName)) + require.NoError(t, err) + discoverytest.Run(t, "nginx", otelConfigPath, test.logMessageToAssert) + }) + } +} diff --git a/tests/receivers/nginx/testdata/docker_observer_nginx_config.yaml b/tests/receivers/nginx/testdata/docker_observer_nginx_config.yaml new file mode 100644 index 0000000000..c7f73b5c6a --- /dev/null +++ b/tests/receivers/nginx/testdata/docker_observer_nginx_config.yaml @@ -0,0 +1,50 @@ +extensions: + docker_observer: + use_host_bindings: true + basicauth: + client_auth: + username: some_user + password: some_password + +receivers: + discovery: + embed_receiver_config: true + receivers: + nginx: + config: + endpoint: '`(port in [443] ? "https://" : "http://")``endpoint`/nginx_status}}' + auth: + authenticator: basicauth + collection_interval: 1s + rule: type == "container" and any([name, image, command], {# matches "(?i)nginx"}) and not (command matches "splunk.discovery") + status: + metrics: + - status: successful + strict: nginx.connections_accepted + message: nginx receiver is working! + statements: + - status: failed + regexp: "Failed to fetch nginx stats" + message: Failed to retrieve metrics from NGINX stub_status endpoint. + watch_observers: + - docker_observer + +exporters: + debug: + verbosity: detailed + otlp: + endpoint: "${OTLP_ENDPOINT}" + tls: + insecure: true + +service: + telemetry: + logs: + level: info + extensions: + - docker_observer + - basicauth + pipelines: + logs: + receivers: [discovery] + exporters: [otlp, debug] From 82168c55041ca23be148a609e5ce82454e491caf Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Thu, 12 Dec 2024 17:29:39 -0800 Subject: [PATCH 11/12] Cleanup discovery bundle (#5704) * Remove leftover smartagent monitors from discover bundle * Add jmx/cassandra and kafka to discovery README.md * Update internal/confmapprovider/discovery/README.md Co-authored-by: James Hughes (Splunk) * gofmt --------- Co-authored-by: James Hughes (Splunk) --- .../smartagent-collectd-mysql.discovery.yaml | 53 ---------------- .../smartagent-postgresql.discovery.yaml | 63 ------------------- internal/confmapprovider/discovery/README.md | 6 +- .../smartagent-collectd-mysql.discovery.yaml | 49 --------------- ...rtagent-collectd-mysql.discovery.yaml.tmpl | 45 ------------- .../smartagent-postgresql.discovery.yaml | 59 ----------------- .../smartagent-postgresql.discovery.yaml.tmpl | 55 ---------------- .../discovery/bundle/bundle_gen.go | 4 -- .../discovery/bundle/bundledfs_other_test.go | 2 - .../discovery/bundle/bundledfs_others.go | 2 - .../discovery/bundle/bundledfs_windows.go | 1 - .../bundle/bundledfs_windows_test.go | 1 - .../discovery/bundle/components.go | 23 +++---- .../confmapprovider/discovery/config_test.go | 1 - 14 files changed, 14 insertions(+), 350 deletions(-) delete mode 100644 cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-collectd-mysql.discovery.yaml delete mode 100644 cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-postgresql.discovery.yaml delete mode 100644 internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml delete mode 100644 internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl delete mode 100644 internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml delete mode 100644 internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl diff --git a/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-collectd-mysql.discovery.yaml b/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-collectd-mysql.discovery.yaml deleted file mode 100644 index 870f15e592..0000000000 --- a/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-collectd-mysql.discovery.yaml +++ /dev/null @@ -1,53 +0,0 @@ -##################################################################################### -# This file is generated by the Splunk Distribution of the OpenTelemetry Collector. # -# # -# It reflects the default configuration bundled in the Collector executable for use # -# in discovery mode (--discovery) and is provided for reference or customization. # -# Please note that any changes made to this file will need to be reconciled during # -# upgrades of the Collector. # -##################################################################################### -# smartagent/collectd/mysql: -# enabled: false -# rule: -# docker_observer: type == "container" and any([name, image, command], {# matches "(?i)mysql"}) and not (command matches "splunk.discovery") -# host_observer: type == "hostport" and command matches "(?i)mysqld" -# k8s_observer: type == "port" and pod.name matches "(?i)mysql" -# config: -# default: -# type: collectd/mysql -# username: splunk.discovery.default -# password: splunk.discovery.default -# databases: -# - name: splunk.discovery.default -# isolatedCollectd: true -# status: -# metrics: -# - status: successful -# strict: mysql_octets.rx -# message: smartagent/collectd/mysql receiver is working! -# statements: -# - status: failed -# regexp: "mysql plugin: Failed to connect to database .* at server .* Can't connect to MySQL server on .* [(]111[)]" -# message: The container is refusing MySQL connections. -# - status: partial -# regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* [(]using password: .*[)]' -# message: |- -# Make sure your user credentials are correctly specified as environment variables. -# ``` -# SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_username="" -# SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_password="" -# ``` -# - status: partial -# regexp: 'mysql plugin: Failed to connect to database .* at server .* Unknown database' -# message: |- -# Make sure your MySQL databases are correctly specified using as an environment variable. -# ``` -# SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_databases="[{name: ''}, {name: '', username: '', password: ''}]" -# ``` -# - status: partial -# regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* to database' -# message: |- -# Make sure your MySQL databases and auth information are correctly specified as environment variables. -# ``` -# SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_databases="[{name: ''}, {name: '', username: '', password: ''}]" -# ``` diff --git a/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-postgresql.discovery.yaml b/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-postgresql.discovery.yaml deleted file mode 100644 index 9557581306..0000000000 --- a/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-postgresql.discovery.yaml +++ /dev/null @@ -1,63 +0,0 @@ -##################################################################################### -# This file is generated by the Splunk Distribution of the OpenTelemetry Collector. # -# # -# It reflects the default configuration bundled in the Collector executable for use # -# in discovery mode (--discovery) and is provided for reference or customization. # -# Please note that any changes made to this file will need to be reconciled during # -# upgrades of the Collector. # -##################################################################################### -# smartagent/postgresql: -# enabled: false -# rule: -# docker_observer: type == "container" and any([name, image, command], {# matches "(?i)postgres"}) and not (command matches "splunk.discovery") -# host_observer: type == "hostport" and command matches "(?i)postgres" and not (command matches "splunk.discovery") -# k8s_observer: type == "port" and pod.name matches "(?i)postgres" -# config: -# default: -# type: postgresql -# connectionString: 'sslmode=disable user={{.username}} password={{.password}}' -# params: -# username: splunk.discovery.default -# password: splunk.discovery.default -# masterDBName: splunk.discovery.default -# status: -# metrics: -# - status: successful -# strict: postgres_query_count -# message: PostgreSQL receiver is working! -# - status: partial -# strict: postgres_rows_inserted -# message: |- -# Make sure that `CREATE EXTENSION IF NOT EXISTS pg_stat_statements;` has been run for each database you would like to monitor. For example: -# ``` -# psql --dbname "" -c "CREATE EXTENSION IF NOT EXISTS pg_stat_statements;" -# ``` -# statements: -# - status: failed -# regexp: 'connect: network is unreachable' -# message: The container cannot be reached by the Collector. Make sure they're in the same network. -# - status: failed -# regexp: 'connect: connection refused' -# message: The container is refusing PostgreSQL connections. -# - status: partial -# regexp: 'pq: password authentication failed for user' -# message: |- -# Please ensure your user credentials are correctly specified as environment variables. -# ``` -# SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_params_x3a__x3a_username="" -# SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_params_x3a__x3a_password="" -# ``` -# - status: partial -# regexp: 'pq: database .* does not exist' -# message: |- -# Make sure the target database is correctly specified as an environment variable. -# ``` -# SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_masterDBName="" -# ``` -# - status: partial -# regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries' -# message: |- -# Make sure your PostgreSQL database has `shared_preload_libraries = 'pg_stat_statements'` in the postgresql.conf file and that `CREATE EXTENSION IF NOT EXISTS pg_stat_statements;` has been run for each database you would like to monitor. For example: -# ``` -# psql --dbname "" -c "CREATE EXTENSION pg_stat_statements;" -# ``` diff --git a/internal/confmapprovider/discovery/README.md b/internal/confmapprovider/discovery/README.md index 332c282616..7d39fcd82f 100644 --- a/internal/confmapprovider/discovery/README.md +++ b/internal/confmapprovider/discovery/README.md @@ -136,17 +136,19 @@ By default, the discovery mode is provided with pre-made discovery config compon The following components have bundled discovery configurations in the last Splunk OpenTelemetry Collector release: I. Receivers + +* `jmx/cassandra` ([Linux and Windows](./bundle/bundle.d/receivers/jmx-cassandra.discovery.yaml)) +* `kafkametrics` ([Linux and Windows](./bundle/bundle.d/receivers/kafkametrics.discovery.yaml)) * `mongodb` ([Linux and Windows](./bundle/bundle.d/receivers/mongodb.discovery.yaml)) * `mysql` ([Linux and Windows](./bundle/bundle.d/receivers/mysql.discovery.yaml)) * `nginx` ([Linux and Windows](./bundle/bundle.d/receivers/nginx.discovery.yaml)) * `oracledb` ([Linux and Windows](./bundle/bundle.d/receivers/oracledb.discovery.yaml)) * `postgresql` ([Linux and Windows](./bundle/bundle.d/receivers/postgresql.discovery.yaml)) * `redis` ([Linux and Windows](./bundle/bundle.d/receivers/redis.discovery.yaml)) -* `smartagent` with `collectd/mysql` monitor type ([Linux](./bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml)) -* `smartagent` with `postgresql` monitor type ([Linux and Windows](./bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml)) * `sqlserver` ([Linux And Windows](./bundle/bundle.d/receivers/sqlserver.discovery.yaml)) II. Extensions + * `docker_observer` ([Linux and Windows](./bundle/bundle.d/extensions/docker-observer.discovery.yaml)) * `host_observer` ([Linux and Windows](./bundle/bundle.d/extensions/host-observer.discovery.yaml)) * `k8s_observer` ([Linux and Windows](./bundle/bundle.d/extensions/k8s-observer.discovery.yaml)) diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml deleted file mode 100644 index d4dd13c112..0000000000 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml +++ /dev/null @@ -1,49 +0,0 @@ -##################################################################################### -# Do not edit manually! # -# All changes must be made to associated .tmpl file before running 'make bundle.d'. # -##################################################################################### -smartagent/collectd/mysql: - enabled: false - rule: - docker_observer: type == "container" and any([name, image, command], {# matches "(?i)mysql"}) and not (command matches "splunk.discovery") - host_observer: type == "hostport" and command matches "(?i)mysqld" - k8s_observer: type == "port" and pod.name matches "(?i)mysql" - config: - default: - type: collectd/mysql - username: splunk.discovery.default - password: splunk.discovery.default - databases: - - name: splunk.discovery.default - isolatedCollectd: true - status: - metrics: - - status: successful - strict: mysql_octets.rx - message: smartagent/collectd/mysql receiver is working! - statements: - - status: failed - regexp: "mysql plugin: Failed to connect to database .* at server .* Can't connect to MySQL server on .* [(]111[)]" - message: The container is refusing MySQL connections. - - status: partial - regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* [(]using password: .*[)]' - message: |- - Make sure your user credentials are correctly specified as environment variables. - ``` - SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_username="" - SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_password="" - ``` - - status: partial - regexp: 'mysql plugin: Failed to connect to database .* at server .* Unknown database' - message: |- - Make sure your MySQL databases are correctly specified using as an environment variable. - ``` - SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_databases="[{name: ''}, {name: '', username: '', password: ''}]" - ``` - - status: partial - regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* to database' - message: |- - Make sure your MySQL databases and auth information are correctly specified as environment variables. - ``` - SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_databases="[{name: ''}, {name: '', username: '', password: ''}]" - ``` diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl deleted file mode 100644 index 2efec9a7c8..0000000000 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl +++ /dev/null @@ -1,45 +0,0 @@ -{{ receiver "smartagent/collectd/mysql" }}: - enabled: false - rule: - docker_observer: type == "container" and any([name, image, command], {# matches "(?i)mysql"}) and not (command matches "splunk.discovery") - host_observer: type == "hostport" and command matches "(?i)mysqld" - k8s_observer: type == "port" and pod.name matches "(?i)mysql" - config: - default: - type: collectd/mysql - username: {{ defaultValue }} - password: {{ defaultValue }} - databases: - - name: {{ defaultValue }} - isolatedCollectd: true - status: - metrics: - - status: successful - strict: mysql_octets.rx - message: smartagent/collectd/mysql receiver is working! - statements: - - status: failed - regexp: "mysql plugin: Failed to connect to database .* at server .* Can't connect to MySQL server on .* [(]111[)]" - message: The container is refusing MySQL connections. - - status: partial - regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* [(]using password: .*[)]' - message: |- - Make sure your user credentials are correctly specified as environment variables. - ``` - {{ configPropertyEnvVar "username" "" }} - {{ configPropertyEnvVar "password" "" }} - ``` - - status: partial - regexp: 'mysql plugin: Failed to connect to database .* at server .* Unknown database' - message: |- - Make sure your MySQL databases are correctly specified using as an environment variable. - ``` - {{ configPropertyEnvVar "databases" "[{name: ''}, {name: '', username: '', password: ''}]" }} - ``` - - status: partial - regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* to database' - message: |- - Make sure your MySQL databases and auth information are correctly specified as environment variables. - ``` - {{ configPropertyEnvVar "databases" "[{name: ''}, {name: '', username: '', password: ''}]" }} - ``` diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml deleted file mode 100644 index cbc6be6bcc..0000000000 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml +++ /dev/null @@ -1,59 +0,0 @@ -##################################################################################### -# Do not edit manually! # -# All changes must be made to associated .tmpl file before running 'make bundle.d'. # -##################################################################################### -smartagent/postgresql: - enabled: false - rule: - docker_observer: type == "container" and any([name, image, command], {# matches "(?i)postgres"}) and not (command matches "splunk.discovery") - host_observer: type == "hostport" and command matches "(?i)postgres" and not (command matches "splunk.discovery") - k8s_observer: type == "port" and pod.name matches "(?i)postgres" - config: - default: - type: postgresql - connectionString: 'sslmode=disable user={{.username}} password={{.password}}' - params: - username: splunk.discovery.default - password: splunk.discovery.default - masterDBName: splunk.discovery.default - status: - metrics: - - status: successful - strict: postgres_query_count - message: PostgreSQL receiver is working! - - status: partial - strict: postgres_rows_inserted - message: |- - Make sure that `CREATE EXTENSION IF NOT EXISTS pg_stat_statements;` has been run for each database you would like to monitor. For example: - ``` - psql --dbname "" -c "CREATE EXTENSION IF NOT EXISTS pg_stat_statements;" - ``` - statements: - - status: failed - regexp: 'connect: network is unreachable' - message: The container cannot be reached by the Collector. Make sure they're in the same network. - - status: failed - regexp: 'connect: connection refused' - message: The container is refusing PostgreSQL connections. - - status: partial - regexp: 'pq: password authentication failed for user' - message: |- - Please ensure your user credentials are correctly specified as environment variables. - ``` - SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_params_x3a__x3a_username="" - SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_params_x3a__x3a_password="" - ``` - - status: partial - regexp: 'pq: database .* does not exist' - message: |- - Make sure the target database is correctly specified as an environment variable. - ``` - SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_masterDBName="" - ``` - - status: partial - regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries' - message: |- - Make sure your PostgreSQL database has `shared_preload_libraries = 'pg_stat_statements'` in the postgresql.conf file and that `CREATE EXTENSION IF NOT EXISTS pg_stat_statements;` has been run for each database you would like to monitor. For example: - ``` - psql --dbname "" -c "CREATE EXTENSION pg_stat_statements;" - ``` diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl deleted file mode 100644 index c7be9c35f3..0000000000 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl +++ /dev/null @@ -1,55 +0,0 @@ -{{ receiver "smartagent/postgresql" }}: - enabled: false - rule: - docker_observer: type == "container" and any([name, image, command], {# matches "(?i)postgres"}) and not (command matches "splunk.discovery") - host_observer: type == "hostport" and command matches "(?i)postgres" and not (command matches "splunk.discovery") - k8s_observer: type == "port" and pod.name matches "(?i)postgres" - config: - default: - type: postgresql - connectionString: 'sslmode=disable user={{ "{{.username}}" }} password={{ "{{.password}}" }}' - params: - username: {{ defaultValue }} - password: {{ defaultValue }} - masterDBName: {{ defaultValue }} - status: - metrics: - - status: successful - strict: postgres_query_count - message: PostgreSQL receiver is working! - - status: partial - strict: postgres_rows_inserted - message: |- - Make sure that `CREATE EXTENSION IF NOT EXISTS pg_stat_statements;` has been run for each database you would like to monitor. For example: - ``` - psql --dbname "" -c "CREATE EXTENSION IF NOT EXISTS pg_stat_statements;" - ``` - statements: - - status: failed - regexp: 'connect: network is unreachable' - message: The container cannot be reached by the Collector. Make sure they're in the same network. - - status: failed - regexp: 'connect: connection refused' - message: The container is refusing PostgreSQL connections. - - status: partial - regexp: 'pq: password authentication failed for user' - message: |- - Please ensure your user credentials are correctly specified as environment variables. - ``` - {{ configPropertyEnvVar "params" "username" "" }} - {{ configPropertyEnvVar "params" "password" "" }} - ``` - - status: partial - regexp: 'pq: database .* does not exist' - message: |- - Make sure the target database is correctly specified as an environment variable. - ``` - {{ configPropertyEnvVar "masterDBName" "" }} - ``` - - status: partial - regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries' - message: |- - Make sure your PostgreSQL database has `shared_preload_libraries = 'pg_stat_statements'` in the postgresql.conf file and that `CREATE EXTENSION IF NOT EXISTS pg_stat_statements;` has been run for each database you would like to monitor. For example: - ``` - psql --dbname "" -c "CREATE EXTENSION pg_stat_statements;" - ``` diff --git a/internal/confmapprovider/discovery/bundle/bundle_gen.go b/internal/confmapprovider/discovery/bundle/bundle_gen.go index 15e4a241a2..060af08308 100644 --- a/internal/confmapprovider/discovery/bundle/bundle_gen.go +++ b/internal/confmapprovider/discovery/bundle/bundle_gen.go @@ -43,10 +43,6 @@ //go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/rabbitmq.discovery.yaml.tmpl //go:generate discoverybundler --render --template bundle.d/receivers/redis.discovery.yaml.tmpl //go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/redis.discovery.yaml.tmpl -//go:generate discoverybundler --render --template bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl -//go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl -//go:generate discoverybundler --render --template bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl -//go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl //go:generate discoverybundler --render --template bundle.d/receivers/sqlserver.discovery.yaml.tmpl //go:generate discoverybundler --render --commented --dir ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/sqlserver.discovery.yaml.tmpl diff --git a/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go b/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go index efe3c5320e..c75bbe417f 100644 --- a/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go +++ b/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go @@ -37,8 +37,6 @@ func TestBundleDir(t *testing.T) { "bundle.d/receivers/postgresql.discovery.yaml", "bundle.d/receivers/rabbitmq.discovery.yaml", "bundle.d/receivers/redis.discovery.yaml", - "bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml", - "bundle.d/receivers/smartagent-postgresql.discovery.yaml", "bundle.d/receivers/sqlserver.discovery.yaml", }, receivers) diff --git a/internal/confmapprovider/discovery/bundle/bundledfs_others.go b/internal/confmapprovider/discovery/bundle/bundledfs_others.go index f69627a056..f17509a558 100644 --- a/internal/confmapprovider/discovery/bundle/bundledfs_others.go +++ b/internal/confmapprovider/discovery/bundle/bundledfs_others.go @@ -35,7 +35,5 @@ import ( //go:embed bundle.d/receivers/postgresql.discovery.yaml //go:embed bundle.d/receivers/rabbitmq.discovery.yaml //go:embed bundle.d/receivers/redis.discovery.yaml -//go:embed bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml -//go:embed bundle.d/receivers/smartagent-postgresql.discovery.yaml //go:embed bundle.d/receivers/sqlserver.discovery.yaml var BundledFS embed.FS diff --git a/internal/confmapprovider/discovery/bundle/bundledfs_windows.go b/internal/confmapprovider/discovery/bundle/bundledfs_windows.go index 334bb19743..da13549b6e 100644 --- a/internal/confmapprovider/discovery/bundle/bundledfs_windows.go +++ b/internal/confmapprovider/discovery/bundle/bundledfs_windows.go @@ -34,6 +34,5 @@ import ( //go:embed bundle.d/receivers/postgresql.discovery.yaml //go:embed bundle.d/receivers/rabbitmq.discovery.yaml //go:embed bundle.d/receivers/redis.discovery.yaml -//go:embed bundle.d/receivers/smartagent-postgresql.discovery.yaml //go:embed bundle.d/receivers/sqlserver.discovery.yaml var BundledFS embed.FS diff --git a/internal/confmapprovider/discovery/bundle/bundledfs_windows_test.go b/internal/confmapprovider/discovery/bundle/bundledfs_windows_test.go index d961b4736d..a94c8a6202 100644 --- a/internal/confmapprovider/discovery/bundle/bundledfs_windows_test.go +++ b/internal/confmapprovider/discovery/bundle/bundledfs_windows_test.go @@ -36,7 +36,6 @@ func TestBundleDir(t *testing.T) { "bundle.d/receivers/postgresql.discovery.yaml", "bundle.d/receivers/rabbitmq.discovery.yaml", "bundle.d/receivers/redis.discovery.yaml", - "bundle.d/receivers/smartagent-postgresql.discovery.yaml", "bundle.d/receivers/sqlserver.discovery.yaml", }, receivers) diff --git a/internal/confmapprovider/discovery/bundle/components.go b/internal/confmapprovider/discovery/bundle/components.go index 2a231d7702..7f025de19a 100644 --- a/internal/confmapprovider/discovery/bundle/components.go +++ b/internal/confmapprovider/discovery/bundle/components.go @@ -41,8 +41,6 @@ var ( "postgresql", "rabbitmq", "redis", - "smartagent-collectd-mysql", - "smartagent-postgresql", "sqlserver", } @@ -67,17 +65,16 @@ var ( }(), Windows: func() map[string]struct{} { windows := map[string]struct{}{ - "apache": {}, - "jmx-cassandra": {}, - "kafkametrics": {}, - "mongodb": {}, - "mysql": {}, - "oracledb": {}, - "postgresql": {}, - "rabbitmq": {}, - "redis": {}, - "smartagent-postgresql": {}, - "sqlserver": {}, + "apache": {}, + "jmx-cassandra": {}, + "kafkametrics": {}, + "mongodb": {}, + "mysql": {}, + "oracledb": {}, + "postgresql": {}, + "rabbitmq": {}, + "redis": {}, + "sqlserver": {}, } for _, extension := range extensions { windows[extension] = struct{}{} diff --git a/internal/confmapprovider/discovery/config_test.go b/internal/confmapprovider/discovery/config_test.go index 697569973b..272515fc21 100644 --- a/internal/confmapprovider/discovery/config_test.go +++ b/internal/confmapprovider/discovery/config_test.go @@ -131,7 +131,6 @@ func TestReceiverToDiscoverEntryPaths(t *testing.T) { assert.True(t, isReceiverToDiscoverEntryPath(fmt.Sprintf(".%creceivers%cany.thing.at.all.discovery.yaml", os.PathSeparator, os.PathSeparator))) assert.False(t, isReceiverToDiscoverEntryPath(fmt.Sprintf(".%cdir%creceivers%cany.thing.at.all.discovery.yml", os.PathSeparator, os.PathSeparator, os.PathSeparator))) assert.False(t, isReceiverToDiscoverEntryPath(fmt.Sprintf(".%cdir%creceivers%cany.thing.at.all.discovery.yaml", os.PathSeparator, os.PathSeparator, os.PathSeparator))) - assert.True(t, isReceiverToDiscoverEntryPath(fmt.Sprintf("bundle.d%creceivers%csmartagent-postgresql.discovery.yaml", os.PathSeparator, os.PathSeparator))) } func TestDiscoveryPropertiesEntryPath(t *testing.T) { From 0a7f444a99565b55238cec0c5775f6cb1b1863a9 Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Fri, 13 Dec 2024 08:28:51 -0800 Subject: [PATCH 12/12] Expose internal metrics at default localhost:8888 address (#5706) Expose internal metrics at default `localhost:8888` address instead of `${SPLUNK_LISTEN_INTERFACE}:8888` This can be changed by changing default values in `service::telemetry::metrics::section`: ```yaml service: telemetry: metrics: readers: - pull: exporter: prometheus: host: localhost port: 8888 ``` This also removes a warning about deprecated `service::telemetry::metrics::address`. --- CHANGELOG.md | 14 ++++++++++++++ cmd/otelcol/config/collector/agent_config.yaml | 5 +---- cmd/otelcol/config/collector/gateway_config.yaml | 5 +---- cmd/otelcol/fips/config/agent_config.yaml | 5 +---- cmd/otelcol/fips/config/gateway_config.yaml | 2 +- tests/general/default_config_test.go | 6 ++---- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a82c29e1c..aa0f24944a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,20 @@ - (Splunk) Automatic Discovery: - Switch bundled NGINX discovery to create [OpenTelemetry NGINX receiver](https://docs.splunk.com/observability/en/gdi/opentelemetry/components/nginx-receiver.html#nginx-receiver) instead of the Smart Agent NGINX monitor ([#5689](https://github.com/signalfx/splunk-otel-collector/pull/5689)) +- (Splunk) Expose internal metrics at default `localhost:8888` address instead of `${SPLUNK_LISTEN_INTERFACE}:8888` ([#5706](https://github.com/signalfx/splunk-otel-collector/pull/5706)) + This can be changed in `service::telemetry::metrics` section: + ```yaml + service: + telemetry: + metrics: + readers: + - pull: + exporter: + prometheus: + host: localhost + port: 8888 + ``` + This also removes a warning about deprecated `service::telemetry::metrics::address`. ### 🚩Deprecations 🚩 diff --git a/cmd/otelcol/config/collector/agent_config.yaml b/cmd/otelcol/config/collector/agent_config.yaml index dd4264997a..00e3bbc08e 100644 --- a/cmd/otelcol/config/collector/agent_config.yaml +++ b/cmd/otelcol/config/collector/agent_config.yaml @@ -71,7 +71,7 @@ receivers: - job_name: 'otel-collector' scrape_interval: 10s static_configs: - - targets: ["${SPLUNK_LISTEN_INTERFACE}:8888"] + - targets: ["0.0.0.0:8888"] metric_relabel_configs: - source_labels: [ __name__ ] regex: 'otelcol_rpc_.*' @@ -166,9 +166,6 @@ exporters: verbosity: detailed service: - telemetry: - metrics: - address: "${SPLUNK_LISTEN_INTERFACE}:8888" extensions: [health_check, http_forwarder, zpages, smartagent] pipelines: traces: diff --git a/cmd/otelcol/config/collector/gateway_config.yaml b/cmd/otelcol/config/collector/gateway_config.yaml index 662d0fa06a..15231c0390 100644 --- a/cmd/otelcol/config/collector/gateway_config.yaml +++ b/cmd/otelcol/config/collector/gateway_config.yaml @@ -37,7 +37,7 @@ receivers: - job_name: 'otel-collector' scrape_interval: 10s static_configs: - - targets: ['${SPLUNK_LISTEN_INTERFACE}:8888'] + - targets: ['0.0.0.0:8888'] metric_relabel_configs: - source_labels: [ __name__ ] regex: 'otelcol_rpc_.*' @@ -127,9 +127,6 @@ exporters: log_data_enabled: false service: - telemetry: - metrics: - address: "${SPLUNK_LISTEN_INTERFACE}:8888" extensions: [health_check, http_forwarder, zpages] pipelines: traces: diff --git a/cmd/otelcol/fips/config/agent_config.yaml b/cmd/otelcol/fips/config/agent_config.yaml index 3c5761fc10..6f43ca53fc 100644 --- a/cmd/otelcol/fips/config/agent_config.yaml +++ b/cmd/otelcol/fips/config/agent_config.yaml @@ -65,7 +65,7 @@ receivers: - job_name: 'otel-collector' scrape_interval: 10s static_configs: - - targets: ["${SPLUNK_LISTEN_INTERFACE}:8888"] + - targets: ["0.0.0.0:8888"] metric_relabel_configs: - source_labels: [ __name__ ] regex: 'otelcol_rpc_.*' @@ -156,9 +156,6 @@ exporters: verbosity: detailed service: - telemetry: - metrics: - address: "${SPLUNK_LISTEN_INTERFACE}:8888" extensions: [health_check, http_forwarder, zpages] pipelines: traces: diff --git a/cmd/otelcol/fips/config/gateway_config.yaml b/cmd/otelcol/fips/config/gateway_config.yaml index 391e707fe0..5d004d0af4 100644 --- a/cmd/otelcol/fips/config/gateway_config.yaml +++ b/cmd/otelcol/fips/config/gateway_config.yaml @@ -37,7 +37,7 @@ receivers: - job_name: 'otel-collector' scrape_interval: 10s static_configs: - - targets: ['${SPLUNK_LISTEN_INTERFACE}:8888'] + - targets: ['0.0.0.0:8888'] metric_relabel_configs: - source_labels: [ __name__ ] regex: 'otelcol_rpc_.*' diff --git a/tests/general/default_config_test.go b/tests/general/default_config_test.go index 077b6ff23d..ddbc422ad4 100644 --- a/tests/general/default_config_test.go +++ b/tests/general/default_config_test.go @@ -159,7 +159,7 @@ func TestDefaultGatewayConfig(t *testing.T) { "scrape_interval": "10s", "static_configs": []any{ map[string]any{ - "targets": []any{fmt.Sprintf("%s:8888", ip)}, + "targets": []any{"0.0.0.0:8888"}, }, }, }, @@ -177,7 +177,6 @@ func TestDefaultGatewayConfig(t *testing.T) { }, }, "service": map[string]any{ - "telemetry": map[string]any{"metrics": map[string]any{"address": fmt.Sprintf("%s:8888", ip)}}, "extensions": []any{"health_check", "http_forwarder", "zpages"}, "pipelines": map[string]any{ "logs": map[string]any{ @@ -369,7 +368,7 @@ func TestDefaultAgentConfig(t *testing.T) { "scrape_interval": "10s", "static_configs": []any{ map[string]any{ - "targets": []any{fmt.Sprintf("%s:8888", ip)}, + "targets": []any{"0.0.0.0:8888"}, }, }, }, @@ -382,7 +381,6 @@ func TestDefaultAgentConfig(t *testing.T) { "nop": nil, }, "service": map[string]any{ - "telemetry": map[string]any{"metrics": map[string]any{"address": fmt.Sprintf("%s:8888", ip)}}, "extensions": []any{"health_check", "http_forwarder", "zpages", "smartagent"}, "pipelines": map[string]any{ "logs": map[string]any{