forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Splunkent client refactor (open-telemetry#27205)
Refactored parts of the Splunk Enterprise receiver to better leverage the pre-existing otel SDK. This PR also updates the README to be a more informative document. [27026](open-telemetry#27026) Unit testing is included and updated to accommodate the new refactor.
- Loading branch information
Showing
12 changed files
with
203 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: 'enhancement' | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: splunkentreceiver | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: "Users can now use auth settings and basicauth extension to connect to their Splunk enterprise deployments" | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [27026] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: | ||
|
||
# If your change doesn't affect end users or the exported elements of any package, | ||
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. | ||
# Optional: The change log or logs in which this entry should be included. | ||
# e.g. '[user]' or '[user, api]' | ||
# Include 'user' if the change is relevant to end users. | ||
# Include 'api' if there is a change to a library API. | ||
# Default: '[user]' | ||
change_logs: [user] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,38 @@ | ||
# Splunk Enterprise Receiver | ||
--- | ||
|
||
The Splunk Enterprise Receiver is a pull based tool which enables the ingestion of key performance metrics (KPI's) describing the operational status of a user's Splunk Enterprise deployment to be | ||
added to their OpenTelemetry Pipeline. | ||
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. | ||
It is designed to leverage several different data sources to gather these metrics including the [introspection api endpoint](https://docs.splunk.com/Documentation/Splunk/9.1.1/RESTREF/RESTintrospect) and serializing | ||
results from ad-hoc searches. Because of this, care must be taken by users when enabling metrics as running searches can effect your Splunk Enterprise Deployment and introspection may fail to report for Splunk | ||
Cloud deployments. The primary purpose of this receiver is to empower those tasked with the maintenance and care of a Splunk Enterprise deployment to leverage opentelemetry and their observability toolset in their | ||
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. | ||
|
||
* `basicauth` (from [basicauthextension](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension)): A configured stanza for the basicauthextension. | ||
* `auth` (no default): String name referencing your auth extension. | ||
* `endpoint` (no default): your Splunk Enterprise host's endpoint. | ||
|
||
The following settings are optional: | ||
|
||
* `collection_interval` (default: 10m): The time between scrape attempts. | ||
* `timeout` (default: 60s): The time the scrape function will wait for a response before returning empty. | ||
|
||
Example: | ||
|
||
```yaml | ||
extensions: | ||
basicauth/client: | ||
client_auth: | ||
username: admin | ||
password: securityFirst | ||
|
||
receivers: | ||
splunkenterprise: | ||
auth: basicauth/client | ||
endpoint: "https://localhost:8089" | ||
timeout: 45s | ||
``` | ||
For a full list of settings exposed by this receiver please look [here](./config.go) with a detailed configuration [here](./testdata/config.yaml). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.