Skip to content

[Splunk] Initial release of the splunk#13085

Merged
kcreddy merged 10 commits intoelastic:mainfrom
sharadcrest:package-splunk
Apr 14, 2025
Merged

[Splunk] Initial release of the splunk#13085
kcreddy merged 10 commits intoelastic:mainfrom
sharadcrest:package-splunk

Conversation

@sharadcrest
Copy link
Contributor

@sharadcrest sharadcrest commented Mar 12, 2025

Proposed commit message

The initial release includes an alert data stream and associated dashboard
and visualizations.

Splunk fields are mapped to their corresponding ECS fields where possible.

Test samples were derived from live data samples, which were subsequently
sanitized.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

How to test this PR locally

  • Clone integrations repo.
  • Install elastic package locally.
  • Start elastic stack using elastic-package.
  • Move to integrations/packages/splunk directory.
  • Run the following command to run tests.

elastic-package test

--- Test results for package: splunk - START ---
╭─────────┬─────────────┬───────────┬─────────────────────────────────────────────────────────────────┬────────┬──────────────╮
│ PACKAGE │ DATA STREAM │ TEST TYPE │ TEST NAME                                                       │ RESULT │ TIME ELAPSED │
├─────────┼─────────────┼───────────┼─────────────────────────────────────────────────────────────────┼────────┼──────────────┤
│ splunk  │             │ asset     │ dashboard splunk-eef0d14a-7e42-414d-a0dc-a41423800158 is loaded │ PASS   │       1.94µs │
│ splunk  │ alert       │ asset     │ index_template logs-splunk.alert is loaded                      │ PASS   │        196ns │
│ splunk  │ alert       │ asset     │ ingest_pipeline logs-splunk.alert-0.1.0 is loaded               │ PASS   │         85ns │
╰─────────┴─────────────┴───────────┴─────────────────────────────────────────────────────────────────┴────────┴──────────────╯
--- Test results for package: splunk - END   ---
Done
Run pipeline tests for the package
--- Test results for package: splunk - START ---
╭─────────┬─────────────┬───────────┬───────────────────────────────────────────┬────────┬──────────────╮
│ PACKAGE │ DATA STREAM │ TEST TYPE │ TEST NAME                                 │ RESULT │ TIME ELAPSED │
├─────────┼─────────────┼───────────┼───────────────────────────────────────────┼────────┼──────────────┤
│ splunk  │ alert       │ pipeline  │ (ingest pipeline warnings test-alert.log) │ PASS   │ 312.589584ms │
│ splunk  │ alert       │ pipeline  │ test-alert.log                            │ PASS   │ 142.020276ms │
╰─────────┴─────────────┴───────────┴───────────────────────────────────────────┴────────┴──────────────╯
--- Test results for package: splunk - END   ---
Done
Run policy tests for the package
--- Test results for package: splunk - START ---
No test results
--- Test results for package: splunk - END   ---
Done
Run static tests for the package
--- Test results for package: splunk - START ---
╭─────────┬─────────────┬───────────┬──────────────────────────┬────────┬──────────────╮
│ PACKAGE │ DATA STREAM │ TEST TYPE │ TEST NAME                │ RESULT │ TIME ELAPSED │
├─────────┼─────────────┼───────────┼──────────────────────────┼────────┼──────────────┤
│ splunk  │ alert       │ static    │ Verify sample_event.json │ PASS   │ 117.602376ms │
╰─────────┴─────────────┴───────────┴──────────────────────────┴────────┴──────────────╯
--- Test results for package: splunk - END   ---
Done
Run system tests for the package
2025/03/12 19:41:29  INFO License text found in "/home/devuser/bitbucket/integrations/LICENSE.txt" will be included in package
2025/03/12 19:41:29  INFO Import ECS mappings into the built package (technical preview)
2025/03/12 19:42:21  INFO Write container logs to file: /home/devuser/bitbucket/integrations/build/container-logs/splunk-1741788741444729491.log
2025/03/12 19:42:24  INFO Write container logs to file: /home/devuser/bitbucket/integrations/build/container-logs/elastic-agent-1741788744249682778.log
--- Test results for package: splunk - START ---
╭─────────┬─────────────┬───────────┬───────────┬────────┬───────────────╮
│ PACKAGE │ DATA STREAM │ TEST TYPE │ TEST NAME │ RESULT │  TIME ELAPSED │
├─────────┼─────────────┼───────────┼───────────┼────────┼───────────────┤
│ splunk  │ alert       │ system    │ default   │ PASS   │ 39.611582238s │
╰─────────┴─────────────┴───────────┴───────────┴────────┴───────────────╯
--- Test results for package: splunk - END   ---
Donee

Screenshots

S1
S2

@andrewkroh andrewkroh added New Integration Issue or pull request for creating a new integration package. dashboard Relates to a Kibana dashboard bug, enhancement, or modification. labels Mar 13, 2025
@kcreddy
Copy link
Contributor

kcreddy commented Mar 17, 2025

/test

@kcreddy kcreddy added the Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] label Mar 17, 2025
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@kcreddy kcreddy added the Crest Contributions from Crest developement team. label Mar 17, 2025
Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

Error: there is no owner for "packages/splunk" in ".github/CODEOWNERS"

@sharadcrest sharadcrest requested a review from efd6 March 18, 2025 05:53
@efd6
Copy link
Contributor

efd6 commented Mar 18, 2025

/test

@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

"_time": "2025-02-10T06:20:16.000Z",
"annotations": {
"mitre_attack": {
"mitre_tactic": "mite",

Choose a reason for hiding this comment

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

Could some of these mitre fields be mapped the threat.* fields in ECS? https://www.elastic.co/guide/en/ecs/current/ecs-threat.html

"app": "ssl-web",
"count": 5.0,
"dest_count": 1,
"friendly_name": "Access - Excessive Failed Logins - Rule",

Choose a reason for hiding this comment

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

Could rule.name be a suitable field for this one? Alternatively, we populate the message fields with this friendly name and use that as the Alert Name in our promotion rule, meaning users will see 'Access - Excessive Failed Logins' as the alert name in our UI.

type: string
ignore_missing: true
- convert:
field: splunk.alert.risk_score

Choose a reason for hiding this comment

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

Should we also set event.risk_score with this value since event.risk_score is an ECS field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

set event.risk_score mapping.👍

- name: event.dataset
type: constant_keyword
description: Event dataset.
value: splunk.alert

Choose a reason for hiding this comment

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

Should this be splunk.alerts instead to be consistent with the endpoint integration where the value is set to endpoint.alerts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We used to follow the data stream name as singular as per the best practices. @kcreddy let me know your thoughts on this.

Copy link
Contributor

@kcreddy kcreddy Mar 21, 2025

Choose a reason for hiding this comment

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

There is no clear guidelines on this in any Elastic docs I can find.
I checked Integration guide, ECS definition, an introduction blog, and fleet docs, none of which mentions which is preferred.

In our current integrations alone:
find . -maxdepth 3 -type d -name "*alert*", we have 9 plural and 16 singular names for alert(s).

./prisma_cloud/data_stream/alert
./microsoft_sentinel/data_stream/alert
./cloud_defend/data_stream/alerts
./crowdstrike/data_stream/alert
./zerofox/data_stream/alerts
./trend_micro_vision_one/data_stream/alert
./darktrace/data_stream/ai_analyst_alert
./darktrace/data_stream/model_breach_alert
./darktrace/data_stream/system_status_alert
./ti_rapid7_threat_command/data_stream/alert
./sysdig/data_stream/alerts
./sophos_central/data_stream/alert
./google_secops/data_stream/alert
./m365_defender/data_stream/alert
./mongodb_atlas/data_stream/alert
./jamf_protect/data_stream/alerts
./google_workspace/data_stream/alert
./zscaler_zia/data_stream/alerts
./falco/data_stream/alerts
./blacklens/data_stream/alerts
./sentinel_one/data_stream/alert
./panw_cortex_xdr/data_stream/alerts
./netskope/data_stream/alerts
./carbon_black_cloud/data_stream/alert_v7
./carbon_black_cloud/data_stream/alert

I don't have a preference. We can go ahead with @peluja1012 suggestion.
@jamiehynds, any thoughts?

Choose a reason for hiding this comment

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

Hi @sharadcrest, apologies for confusion. Please go ahead and use the singular form as you have it currently. Thanks!

@sharadcrest sharadcrest requested review from efd6 and kcreddy March 20, 2025 16:28
@kcreddy
Copy link
Contributor

kcreddy commented Mar 21, 2025

/test

Copy link
Contributor

@kcreddy kcreddy left a comment

Choose a reason for hiding this comment

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

@sharadcrest could you address the review comments?

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

There are remaining unaddressed comments.

@sharadcrest sharadcrest requested review from andrewkroh and efd6 April 2, 2025 11:05
@kcreddy
Copy link
Contributor

kcreddy commented Apr 2, 2025

/test

@efd6
Copy link
Contributor

efd6 commented Apr 3, 2025

/test

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

Thanks

@efd6
Copy link
Contributor

efd6 commented Apr 3, 2025

@sharadcrest Before this is merged, can you note where the test cases were obtained?

@sharadcrest
Copy link
Contributor Author

@sharadcrest Before this is merged, can you note where the test cases were obtained?

@efd6 Test cases were derived from live data samples, which were subsequently sanitized.

@efd6
Copy link
Contributor

efd6 commented Apr 4, 2025

Thanks @sharadcrest. For whoever merges, I'll propose this commit message body (the title line looks fine to me)

The initial release includes an alert data stream and associated dashboard
and visualizations.

Splunk fields are mapped to their corresponding ECS fields where possible.

Test samples were derived from live data samples, which were subsequently
sanitized.

Copy link
Contributor

@kcreddy kcreddy left a comment

Choose a reason for hiding this comment

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

@sharadcrest, I'm blocking the merge as some requirements are still being discussed.
cc: @jamiehynds @piyush-elastic

@sharadcrest sharadcrest requested a review from a team as a code owner April 11, 2025 05:03
@sharadcrest sharadcrest requested a review from kcreddy April 11, 2025 05:04
@kcreddy
Copy link
Contributor

kcreddy commented Apr 14, 2025

/test

"application/x-www-form-urlencoded",
{
"output_mode":["json"],
"search":["search index=notable AND " + state.?search.orValue('""')],
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this search query work in Splunk?

search index=notable AND ""

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. I bet it doesn't.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we removed the search parameter from the manifest to avoid confusion to the user as per the further discussions.

Copy link
Contributor

Choose a reason for hiding this comment

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

@kcreddy, @efd6 – As per my last discussion with @jamiehynds, we’ve removed SPL support and retained only the notable index as the default value. We've also updated the logo and submitted the corresponding changes in the PR. Kindly review the latest commit when you get a chance.

Copy link
Contributor

@kcreddy kcreddy Apr 14, 2025

Choose a reason for hiding this comment

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

Thanks @piyush-elastic @sharadcrest
@jamiehynds let me know if this sounds good, I can merge the PR.

@sharadcrest sharadcrest requested a review from kcreddy April 14, 2025 06:31
@kcreddy
Copy link
Contributor

kcreddy commented Apr 14, 2025

/test

@elasticmachine
Copy link

💚 Build Succeeded

History

@elastic-sonarqube
Copy link

@kcreddy kcreddy merged commit e4c1f04 into elastic:main Apr 14, 2025
7 checks passed
@elastic-vault-github-plugin-prod

Package splunk - 0.1.0 containing this change is available at https://epr.elastic.co/package/splunk/0.1.0/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Crest Contributions from Crest developement team. dashboard Relates to a Kibana dashboard bug, enhancement, or modification. Integration:splunk Splunk New Integration Issue or pull request for creating a new integration package. Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants