Skip to content

Commit 5e767e6

Browse files
authored
V1.5.0 (#11)
* package new version
1 parent 2ab1db0 commit 5e767e6

33 files changed

+2011
-794
lines changed

.DS_Store

-6 KB
Binary file not shown.

README.md

Lines changed: 44 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,75 @@
11
# DataSet Add-on for Splunk
2-
The DataSet Add-on for Splunk provides integration with [DataSet](https://www.dataset.com) by [SentinelOne](https://sentinelone.com). The key functions allow two-way integration:
3-
- SPL custom command to query DataSet directly from the Splunk UI without having to reindex data to Splunk.
4-
- Inputs to index alerts as CIM-compliant, or user-defined query results, from DataSet to Splunk.
5-
- Alert action to send events from Splunk to DataSet.
2+
The DataSet Add-on for Splunk provides integration with [DataSet](https://www.dataset.com) and [XDR](https://www.sentinelone.com/platform/xdr-ingestion) by [SentinelOne](https://sentinelone.com). The key functions allow two-way integration:
3+
- SPL custom command to query directly from the Splunk UI.
4+
- Inputs to index alerts as CIM-compliant, or any user-defined query results.
5+
- Alert action to send events from Splunk.
66

77
## Installation
8-
The included .tgz file is ready for installation in Splunk. The package subdirectory contains all artifacts. To compile, reference Splunk's [UCC Framework instructions](https://splunk.github.io/addonfactory-ucc-generator/how_to_use/) to use `ucc-gen` and `slim package`.
8+
The add-on can be installed from [Splunkbase](https://splunkbase.splunk.com/app/6575) or manually via the .tgz file. For those looking to customize, the package subdirectory contains all artifacts. To compile, reference Splunk's [UCC Framework instructions](https://splunk.github.io/addonfactory-ucc-generator/how_to_use/) to use `ucc-gen` and `slim package`.
99

10-
Reference Splunk documentation for [installing add-ons](https://docs.splunk.com/Documentation/AddOns/released/Overview/Installingadd-ons). Note admins require `admin_all_objects` to create secret storage objects and users require `list_storage_passwords` capability to retrieve secrets.
10+
Reference Splunk documentation for [installing add-ons](https://docs.splunk.com/Documentation/AddOns/released/Overview/Installingadd-ons).
11+
12+
## Permissions
13+
The add-on uses Splunk encrypted secrets storage, so admins require `admin_all_objects` to create secret storage objects and users require `list_storage_passwords` capability to retrieve secrets.
1114

1215
### Splunk Enterprise
1316
| Splunk component | Required | Comments |
1417
| ------ | ------ | ------ |
1518
| Search heads | Yes | Required to use the custom search command. |
1619
| Indexers | No | Parsing is performed during data collection. |
17-
| Forwarders | Yes | For distributed deployments, this add-on requires heavy forwarders for modular inputs. |
20+
| Forwarders | Optional | For distributed deployments, if the modular inputs are used, this add-on is installed on heavy forwarders. |
1821

1922
### Splunk Cloud
2023
| Splunk component | Required | Comments |
2124
| ------ | ------ | ------ |
2225
| Search heads | Yes | Required to use the custom search command. Splunk Cloud Victoria Experience also handles modular inputs on the search heads. |
2326
| Indexers | No | Parsing is performed during data collection. |
24-
| Inputs Data Manager | Yes | For Splunk Cloud Classic Experience, this add-on requires an IDM for modular inputs. |
27+
| Inputs Data Manager | Optional | For Splunk Cloud Classic Experience, if the modular inputs are used, this add-on is installed on an IDM. |
2528

2629
## Configuration
27-
### Dataset
28-
1. Navigate to API Keys.
30+
### XDR
31+
1. From the SentinelOne console, ensure Enhanced Deep Visibility is enabled by clicking your name > My User > Change Deep Visibility Mode > Enhanced.
32+
33+
![Setting Enhanced Deep Visibility](README_images/setup_enhanced_dv.png)
34+
35+
2. Open Enhanced Deep Visibility.
36+
3. Continue following the DataSet instructions below.
37+
38+
### Dataset (or XDR continued)
39+
1. Make note of the URL (e.g. `https://app.scalyr.com` or `https://xdr.us1.sentinelone.net`). For XDR users, note this differs from the core SentinelOne console URL.
40+
2. Navigate to API Keys.
2941

3042
![Creating DataSet API keys](README_images/dataset_key.png)
3143

32-
2. Click Add Key > Add Read Key (required for search command and inputs).
33-
3. Click Add Key > Add Write Key (required for alert action).
34-
4. Optionally, click the pencil icon to rename the keys.
44+
3. Click Add Key > Add Read Key (required for search command and inputs).
45+
4. Click Add Key > Add Write Key (required for alert action).
46+
5. Optionally, click the pencil icon to rename the keys.
3547

3648
### Splunk
3749
1. In Splunk, open the Add-on
3850

3951
![Configuring DataSet Account](README_images/setup_account.png)
4052

41-
2. In configuration on DataSet Account tab:
42-
- Enter the DataSet URL (e.g.: `https://app.scalyr.com`).
43-
- Enter the DataSet read key from above.
44-
- Enter the DataSet write key from above.
53+
2. On the configuration > account tab:
54+
- Click Add
55+
- Enter a user-friendly account name. For multiple accounts, the account name can be used in queries (more details below).
56+
- Enter the full URL noted above (e.g.: `https://app.scalyr.com` or `https://xdr.us1.sentinelone.net`).
57+
- Enter the DataSet read key from above (required for searching)
58+
- Enter the DataSet write key from above (only required for alert actions).
59+
- Click Save
4560

4661
3. Optionally, configure logging level and proxy information on the associated tabs.
4762
4. Click Save.
48-
5. To confirm connectivity, simply search `|dataset` and validate results.
63+
5. The included DataSet by Example dashboard can be used to confirm connectivity and also shows example searches to get started.
4964

5065
## SPL Command
51-
The `| dataset` command allows queries against the DataSet API directly from Splunk's search bar.
66+
The `| dataset` command allows queries against the [DataSet APIs](https://app.scalyr.com/help/api) directly from Splunk's search bar.
5267

5368
Optional parameters are supported:
5469

70+
- **account** - If multiple accounts are used, the account name as configured in setup can be specified (`emea` in the screenshot above). If multiple accounts are configured but not specified in search, the first result (by alphanumeric name) is used. To search across all accounts, `account=*` can be used.
5571
- **method** - Define `query`, `powerquery`, `facet` or `timeseries` to call the appropriate REST endpoint. Default is query.
56-
- **query** - The DataSet [query](https://app.scalyr.com/help/query-language) or filter used to select events. Default is no filter (return all events limited by time and maxCount).
72+
- **query** - The DataSet [query](https://app.scalyr.com/help/query-language) filter used to select events. Default is no filter (return all events limited by time and maxCount).
5773
- **starttime** - The Splunk time picker can be used (not "All Time"), but if starttime is defined it will take precedence to define the [start time](https://app.scalyr.com/help/time-reference) for DataSet events to return. Use epoch time or relative shorthand in the form of a number followed by d, h, m or s (for days, hours, minutes or seconds), e.g.: `24h`. Default is 24h.
5874
- **endtime** - The Splunk time picker can be used (not "All Time"), but if endtime is defined it will take precedence to define the [end time](https://app.scalyr.com/help/time-reference) for DataSet events to return. Use epoch time or relative shorthand in the form of a number followed by d, h, m or s (for days, hours, minutes or seconds), e.g.: `5m`. Default is current time at search.
5975

@@ -83,15 +99,15 @@ Power Query Example 1: `| dataset method=powerquery search="dataset = \"accesslo
8399

84100
![SPL Power Query example](README_images/spl_powerquery.png)
85101

86-
Power Query Example 2: `| dataset method=powerQuery search="$serverHost == 'cloudWatchLogs'
102+
Power Query Example 2: `| dataset account=emea method=powerQuery search="$serverHost == 'cloudWatchLogs'
87103
| parse 'RequestId: $RID$ Duration: $DUR$ ms Billed Duration: $BDUR$ ms Memory Size: $MEM$ MB Max Memory Used: $UMEM$ MB'
88104
| let deltaDUR= BDUR - DUR, deltaMEM = MEM - UMEM
89105
| sort -DUR
90106
| columns 'Request ID' = RID, 'Duration(ms)' = DUR, 'Charged delta (ms)' = deltaDUR, 'Used Memory (MB)' = UMEM, 'Charged delta Memory (MB)' = deltaMEM" starttime=5m`
91107

92108
Facet Query Example:
93109
`
94-
| dataset method=facet search="serverHost = *" field=serverHost maxcount=25
110+
| dataset account=* method=facet search="serverHost = *" field=serverHost maxcount=25
95111
| spath
96112
| table value, count
97113
`
@@ -151,12 +167,14 @@ For use cases requiring data indexed in Splunk, optional inputs are provided uti
151167
An alert action allows sending an event to the DataSet [addEvents API](https://app.scalyr.com/help/api#addEvents).
152168

153169
## Support and troubleshooting
154-
Error saving configuration "CSRF validation failed" - this is a Splunk browser issue; try using a private window or clearing cache and cookies then retrying.
170+
Error saving configuration "CSRF validation failed" - This is a Splunk browser issue; try reloading the page, using a private window or clearing cache and cookies then retrying.
171+
172+
Search errors `Account token error, review search log for details` or `Splunk configuration error, see search log for details.` - API token was unable to be retrieved. Common issues include user role missing list_storage_passwords permission, API token not set or incorrect account name given that has not been configured. Review job inspector search log for errors returned by Splunk. `Error retrieving account settings, error = UrlEncoded('broken')` indicates a likely misconfigured or incorrect account name; `splunklib.binding.HTTPError: HTTP 403 Forbidden -- You (user=username) do not have permission to perform this operation (requires capability: list_storage_passwords OR admin_all_objects)` indicates missing Splunk user permissions (list_storage_passwords).
155173

156-
To troubleshoot the custom command, check the Job Inspector search log, also available in the internal index: `index=_internal app="TA-dataset" sourcetype=splunk_search_messages`. Common issues include incorrect API key or firewalls blocking outbound traffic on port 443.
174+
To troubleshoot the custom command, check the Job Inspector search log, also available in the internal index: `index=_internal app="TA-dataset" sourcetype=splunk_search_messages`.
157175

158-
For support, open a ticket with support, or open a GitHub issue.
176+
For support, open a ticket with DataSet (or SentinelOne for XDR) support including any logged errors, or open a GitHub issue.
159177

160178
##### Note
161-
This add-on was built with the [Splunk Add-on UCC framework](https://splunk.github.io/addonfactory-ucc-generator/).
179+
This add-on was built with the [Splunk Add-on UCC framework](https://splunk.github.io/addonfactory-ucc-generator/) and uses the [Splunk Enterprise Python SDK](https://github.com/splunk/splunk-sdk-python).
162180
Splunk is a trademark or registered trademark of Splunk Inc. in the United States and other countries.

README_images/setup_account.png

65.7 KB
Loading
18.1 KB
Loading

0 commit comments

Comments
 (0)