Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splunkent update conf #31183

Merged
merged 19 commits into from
Mar 4, 2024
Merged

Conversation

shalper2
Copy link
Contributor

Description: Make changes to configuration of the application to allow the user to specify endpoints corresponding to different Splunk node types. Specifically, this update will allow users to define three separate clients: indexer, cluster master, and search head. This change will allow for the addition of metrics corresponding to these different modes of operation within the Splunk enterprise deployment.

Link to tracking Issue: 30254

Testing: Unit tests were updated to run against new configuration options.

Documentation: Updated README to reflect the new changes in configuration.

@shalper2 shalper2 force-pushed the splunkent-update-conf branch 3 times, most recently from 2e142fd to 54af9a6 Compare February 14, 2024 21:27
@shalper2 shalper2 marked this pull request as ready for review February 14, 2024 21:27
@shalper2 shalper2 requested a review from a team February 14, 2024 21:27
@@ -8,7 +8,7 @@ jobs.

## Configuration

The following settings are required, omitting them will either cause your receiver to fail to compile or result in 4/5xx return codes during scraping.
The following settings are required, omitting them will either cause your receiver to fail to compile or result in 4/5xx return codes during scraping. These must be set for each Splunk instance type (indexer, search head, or cluster master) from which you wish to pull metrics. At present, only one of each type is accepted, per configured receiver instance.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify here. only one of each type is accepted means that if I had 3 indexers I'd need to have 3 different splunkenterprise receiver entries each with 1 of the indexers included.
Is my reading of that right?

This isn't an issue mostly just a clarification question. TY!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct! I'll add your example in for clarity.

loglevel: info

service:
extensions: [basicauth/indexer, basicauth/cluster_master]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for documenting this! I can see some getting hung up on the multiple basicauth entries until the concept clicks.

@shalper2 shalper2 force-pushed the splunkent-update-conf branch from 54af9a6 to 5368c39 Compare February 20, 2024 15:26
@@ -28,14 +28,17 @@ func createDefaultConfig() component.Config {
httpCfg.Headers = map[string]configopaque.String{
"Content-Type": "application/x-www-form-urlencoded",
}
httpCfg.Timeout = defaultMaxSearchWaitTime
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this just not being set before at all? Or was it pulling the default from the httpclient or something?

Copy link
Contributor

@greatestusername greatestusername left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! One request RE: the newer metric search scrapes and these changes. Other than that LGTM!

return
}
ctx = context.WithValue(ctx, endpointType("type"), typeCm)
// Because we have to utilize network resources for each KPI we should check that each metrics
// is enabled before proceeding
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these changes will need to be made on the new indexer search scrapes also I assume? If so mind adding those to the newly merged searches from last PR?

@shalper2 shalper2 force-pushed the splunkent-update-conf branch 6 times, most recently from ed9bb40 to 4451226 Compare February 23, 2024 17:09
@@ -8,7 +8,7 @@ jobs.

## Configuration

The following settings are required, omitting them will either cause your receiver to fail to compile or result in 4/5xx return codes during scraping.
The following settings are required, omitting them will either cause your receiver to fail to compile or result in 4/5xx return codes during scraping. These must be set for each Splunk instance type (indexer, search head, or cluster master) from which you wish to pull metrics. At present, only one of each type is accepted, per configured receiver instance. This means, for example, that if you have three different "indexer" type instances that you would like to pull metrics from you will need to configure three different `splunkenterprise` receivers for each indexer node you wish to monitor.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I'm a docs dork... Mind putting this in its own paragraph? and/or following a **NOTE:** to REALLY DRIVE HOME this specific thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea makes sense to me!

@shalper2 shalper2 force-pushed the splunkent-update-conf branch from 4451226 to ea6b2a5 Compare February 26, 2024 15:11
Copy link
Contributor

@greatestusername greatestusername left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I asked most of my questions in comments. All addressed! LGTM!

@shalper2 shalper2 force-pushed the splunkent-update-conf branch from a9cefbf to 71f9c72 Compare February 27, 2024 15:20
@shalper2
Copy link
Contributor Author

@open-telemetry/collector-contrib-approvers wondering if I could get some eyes on this, thanks!

@shalper2 shalper2 requested a review from atoulme March 1, 2024 16:59
@shalper2
Copy link
Contributor Author

shalper2 commented Mar 1, 2024

@atoulme believe i fixed the things

Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The following settings are required, omitting them will either cause your receiver to fail to compile or result in 4/5xx return codes during scraping.
The following settings are required, omitting them will either cause your receiver to fail to compile or result in 4/5xx return codes during scraping.

**NOTE:** These must be set for each Splunk instance type (indexer, search head, or cluster master) from which you wish to pull metrics. At present, only one of each type is accepted, per configured receiver instance. This means, for example, that if you have three different "indexer" type instances that you would like to pull metrics from you will need to configure three different `splunkenterprise` receivers for each indexer node you wish to monitor.

* `basicauth` (from [basicauthextension](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension)): A configured stanza for the basicauthextension.
Copy link
Member

@dmitryax dmitryax Mar 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this PR: can we deprecate and remove this option given that we have auth?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we can, are we planning on moving away from the basicauth extension entirely? Also a little hesitant at the moment since auth is not super well documented right now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's just confusing to have two config options for the same purpose

@dmitryax
Copy link
Member

dmitryax commented Mar 1, 2024

Please run make generate make CI green

@shalper2 shalper2 force-pushed the splunkent-update-conf branch from 45499f5 to 9ed52bf Compare March 4, 2024 20:20
@dmitryax dmitryax merged commit 9ce1aa5 into open-telemetry:main Mar 4, 2024
142 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 4, 2024
mx-psi added a commit to mx-psi/opentelemetry-collector-contrib that referenced this pull request Mar 6, 2024
DougManton pushed a commit to DougManton/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
**Description:** Make changes to configuration of the application to
allow the user to specify endpoints corresponding to different Splunk
node types. Specifically, this update will allow users to define three
separate clients: indexer, cluster master, and search head. This change
will allow for the addition of metrics corresponding to these different
modes of operation within the Splunk enterprise deployment.

**Link to tracking Issue:**
[30254](open-telemetry#30254)

**Testing:** Unit tests were updated to run against new configuration
options.

**Documentation:** Updated README to reflect the new changes in
configuration.
XinRanZhAWS pushed a commit to XinRanZhAWS/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
**Description:** Make changes to configuration of the application to
allow the user to specify endpoints corresponding to different Splunk
node types. Specifically, this update will allow users to define three
separate clients: indexer, cluster master, and search head. This change
will allow for the addition of metrics corresponding to these different
modes of operation within the Splunk enterprise deployment.

**Link to tracking Issue:**
[30254](open-telemetry#30254)

**Testing:** Unit tests were updated to run against new configuration
options.

**Documentation:** Updated README to reflect the new changes in
configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants