Skip to content

feat: Create Splunk target implementation and CRD #838

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

aerosouund
Copy link
Contributor

Users who want to consume the splunk target will need to use splunk HTTP Event Collector (HEC) in their instances

Users who want to consume the splunk target will need to use splunk HTTP Event Collector (HEC) in their instances

Signed-off-by: aerosouund <[email protected]>
Signed-off-by: aerosouund <[email protected]>
@coveralls
Copy link

coveralls commented Mar 22, 2025

Pull Request Test Coverage Report for Build 14067215543

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 65 of 96 (67.71%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 81.597%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/api/v2/views.go 2 9 22.22%
pkg/target/factory/factory.go 36 44 81.82%
pkg/target/splunk/splunk.go 26 42 61.9%
Totals Coverage Status
Change from base Build 14000172709: -0.2%
Covered Lines: 6664
Relevant Lines: 8167

💛 - Coveralls

@@ -827,6 +870,14 @@ func (f *TargetFactory) mapSecretValues(config any, ref, mountedSecret string) {
c.Config.Channel = values.Channel
}

case *v1alpha1.Config[v1alpha1.SplunkOptions]:
if values.Webhook != "" {
Copy link
Member

Choose a reason for hiding this comment

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

You are checking for Webhook and setting Host, you should adopt test cases for splunk to ensure its working

@fjogeleit
Copy link
Member

Splunk should also support a batch API, you could also implement the BatchSend API in this case.

- Add the splunk creation method in the factory interface
- fix MapConfigTargets function typo
- map splunk to a target from the config file
- test secret mapping for splunk
- implement batch send api on splunk

Signed-off-by: aerosouund <[email protected]>
@fjogeleit fjogeleit linked an issue Apr 1, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Splunk as a target
3 participants