From 7fd145b5fceca5faadd35f5bcfca2d043fbd6e52 Mon Sep 17 00:00:00 2001 From: shalper2 <99686388+shalper2@users.noreply.github.com> Date: Thu, 9 May 2024 11:37:07 -0500 Subject: [PATCH] [chore][receiver/splunkenterprise] Splunkent wire component (#32795) **Description:** Graduate splunkenterprise receiver component to alpha **Link to tracking Issue:** **Testing:** Performed `make otelcontribcol` and ran resulting binary with the following config: ```yaml extensions: basicauth/indexer: client_auth: username: admin password: securityFirst basicauth/cluster_master: client_auth: username: admin password: securityFirst receivers: splunkenterprise: indexer: auth: authenticator: basicauth/indexer endpoint: "https://localhost:8089/" timeout: 45s cluster_master: auth: authenticator: basicauth/cluster_master endpoint: "https://localhost:8089/" timeout: 45s exporters: otlp: endpoint: 127.0.0.1:8000 service: extensions: [basicauth/indexer, basicauth/cluster_master] pipelines: metrics: receivers: [splunkenterprise] exporters: [otlp] ``` and received the following output: ``` sh ~> ./otelcontribcol_linux_amd64 --config=file:config.yaml 2024-05-08T17:34:33.032-0500 info service@v0.100.0/service.go:102 Setting up own telemetry... 2024-05-08T17:34:33.032-0500 info service@v0.100.0/telemetry.go:103 Serving metrics {"address": ":8888", "level": "Normal"} 2024-05-08T17:34:33.032-0500 info receiver@v0.100.0/receiver.go:310 Development component. May change in the future. {"kind": "receiver", "name": "splunkenterprise", "data_type": "metrics"} 2024-05-08T17:34:33.033-0500 info service@v0.100.0/service.go:169 Starting otelcontribcol... {"Version": "0.100.0-dev", "NumCPU": 16} 2024-05-08T17:34:33.033-0500 info extensions/extensions.go:34 Starting extensions... 2024-05-08T17:34:33.033-0500 info extensions/extensions.go:37 Extension is starting... {"kind": "extension", "name": "basicauth/cluster_master"} 2024-05-08T17:34:33.033-0500 info extensions/extensions.go:52 Extension started. {"kind": "extension", "name": "basicauth/cluster_master"} 2024-05-08T17:34:33.033-0500 info extensions/extensions.go:37 Extension is starting... {"kind": "extension", "name": "basicauth/indexer"} 2024-05-08T17:34:33.033-0500 info extensions/extensions.go:52 Extension started. {"kind": "extension", "name": "basicauth/indexer"} 2024-05-08T17:34:33.033-0500 info service@v0.100.0/service.go:195 Everything is ready. Begin running and processing data. ``` indicating that the collector was able to successfully start with the component configured. **Documentation:** Documentation was updated to indicate change in status from development to alpha --------- Co-authored-by: Curtis Robert --- cmd/configschema/go.mod | 3 +++ cmd/otelcontribcol/builder-config.yaml | 2 ++ cmd/otelcontribcol/components.go | 2 ++ cmd/otelcontribcol/go.mod | 3 +++ cmd/otelcontribcol/receivers_test.go | 3 +++ go.mod | 3 +++ internal/components/components.go | 2 ++ receiver/splunkenterprisereceiver/README.md | 4 ++-- .../internal/metadata/generated_status.go | 2 +- receiver/splunkenterprisereceiver/metadata.yaml | 2 +- 10 files changed, 22 insertions(+), 4 deletions(-) diff --git a/cmd/configschema/go.mod b/cmd/configschema/go.mod index 4c4269eae03c..28f840601974 100644 --- a/cmd/configschema/go.mod +++ b/cmd/configschema/go.mod @@ -587,6 +587,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.100.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.100.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.100.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkenterprisereceiver v0.100.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.100.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.100.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver v0.100.0 // indirect @@ -1224,3 +1225,5 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/acke replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector => ../../connector/grafanacloudconnector replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension => ../../extension/sumologicextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkenterprisereceiver => ../../receiver/splunkenterprisereceiver diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index b8d5687a41ea..62dd27ec7191 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -190,6 +190,7 @@ receivers: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.100.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.100.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.100.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkenterprisereceiver v0.100.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.100.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.100.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.100.0 @@ -458,3 +459,4 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery => ../../internal/sqlquery - github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension => ../../extension/ackextension - github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension => ../../extension/googleclientauthextension + - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkenterprisereceiver => ../../receiver/splunkenterprisereceiver diff --git a/cmd/otelcontribcol/components.go b/cmd/otelcontribcol/components.go index f96684a55051..2ca7c997d6d9 100644 --- a/cmd/otelcontribcol/components.go +++ b/cmd/otelcontribcol/components.go @@ -195,6 +195,7 @@ import ( snmpreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver" snowflakereceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver" solacereceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver" + splunkenterprisereceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkenterprisereceiver" splunkhecreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver" sqlqueryreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver" sqlserverreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver" @@ -328,6 +329,7 @@ func components() (otelcol.Factories, error) { skywalkingreceiver.NewFactory(), snowflakereceiver.NewFactory(), solacereceiver.NewFactory(), + splunkenterprisereceiver.NewFactory(), splunkhecreceiver.NewFactory(), sqlqueryreceiver.NewFactory(), sqlserverreceiver.NewFactory(), diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index 95e57015be97..7aba937de96a 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -183,6 +183,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.100.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.100.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.100.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkenterprisereceiver v0.100.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.100.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.100.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.100.0 @@ -1281,3 +1282,5 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlqu replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension => ../../extension/ackextension replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension => ../../extension/googleclientauthextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkenterprisereceiver => ../../receiver/splunkenterprisereceiver diff --git a/cmd/otelcontribcol/receivers_test.go b/cmd/otelcontribcol/receivers_test.go index c81c02503674..b2de7709530d 100644 --- a/cmd/otelcontribcol/receivers_test.go +++ b/cmd/otelcontribcol/receivers_test.go @@ -377,6 +377,9 @@ func TestDefaultReceivers(t *testing.T) { { receiver: "snowflake", }, + { + receiver: "splunkenterprise", + }, { receiver: "splunk_hec", }, diff --git a/go.mod b/go.mod index 318de912780a..e534890bbd9c 100644 --- a/go.mod +++ b/go.mod @@ -151,6 +151,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.100.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.100.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.100.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkenterprisereceiver v0.100.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.100.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.100.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver v0.100.0 @@ -1224,3 +1225,5 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/enco replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension => ./extension/encoding/otlpencodingextension replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension => ./extension/ackextension + +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkenterprisereceiver => ./receiver/splunkenterprisereceiver diff --git a/internal/components/components.go b/internal/components/components.go index 46966ee5bf78..47809d68925e 100644 --- a/internal/components/components.go +++ b/internal/components/components.go @@ -169,6 +169,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkenterprisereceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver" @@ -286,6 +287,7 @@ func Components() (otelcol.Factories, error) { snmpreceiver.NewFactory(), snowflakereceiver.NewFactory(), solacereceiver.NewFactory(), + splunkenterprisereceiver.NewFactory(), splunkhecreceiver.NewFactory(), sqlqueryreceiver.NewFactory(), sqlserverreceiver.NewFactory(), diff --git a/receiver/splunkenterprisereceiver/README.md b/receiver/splunkenterprisereceiver/README.md index 91a0a712f292..9f7a69711d1a 100644 --- a/receiver/splunkenterprisereceiver/README.md +++ b/receiver/splunkenterprisereceiver/README.md @@ -3,12 +3,12 @@ | Status | | | ------------- |-----------| -| Stability | [development]: metrics | +| Stability | [alpha]: metrics | | Distributions | [] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fsplunkenterprise%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fsplunkenterprise) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fsplunkenterprise%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fsplunkenterprise) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@shalper2](https://www.github.com/shalper2), [@MovieStoreGuy](https://www.github.com/MovieStoreGuy), [@greatestusername](https://www.github.com/greatestusername) | -[development]: https://github.com/open-telemetry/opentelemetry-collector#development +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha The Splunk Enterprise Receiver is a pull based tool which enables the ingestion of performance metrics describing the operational status of a user's Splunk Enterprise deployment to an appropriate observability tool. diff --git a/receiver/splunkenterprisereceiver/internal/metadata/generated_status.go b/receiver/splunkenterprisereceiver/internal/metadata/generated_status.go index 1ba8354ac2fb..63cfdd5247ff 100644 --- a/receiver/splunkenterprisereceiver/internal/metadata/generated_status.go +++ b/receiver/splunkenterprisereceiver/internal/metadata/generated_status.go @@ -11,5 +11,5 @@ var ( ) const ( - MetricsStability = component.StabilityLevelDevelopment + MetricsStability = component.StabilityLevelAlpha ) diff --git a/receiver/splunkenterprisereceiver/metadata.yaml b/receiver/splunkenterprisereceiver/metadata.yaml index d092ce95e31c..d9ec6a285521 100644 --- a/receiver/splunkenterprisereceiver/metadata.yaml +++ b/receiver/splunkenterprisereceiver/metadata.yaml @@ -4,7 +4,7 @@ scope_name: otelcol/splunkenterprisereceiver status: class: receiver stability: - development: [metrics] + alpha: [metrics] distributions: codeowners: active: [shalper2, MovieStoreGuy, greatestusername]