|
1 | 1 | # 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. |
6 | 6 |
|
7 | 7 | ## 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`. |
9 | 9 |
|
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. |
11 | 14 |
|
12 | 15 | ### Splunk Enterprise |
13 | 16 | | Splunk component | Required | Comments | |
14 | 17 | | ------ | ------ | ------ | |
15 | 18 | | Search heads | Yes | Required to use the custom search command. | |
16 | 19 | | 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. | |
18 | 21 |
|
19 | 22 | ### Splunk Cloud |
20 | 23 | | Splunk component | Required | Comments | |
21 | 24 | | ------ | ------ | ------ | |
22 | 25 | | Search heads | Yes | Required to use the custom search command. Splunk Cloud Victoria Experience also handles modular inputs on the search heads. | |
23 | 26 | | 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. | |
25 | 28 |
|
26 | 29 | ## 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 | + |
| 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. |
29 | 41 |
|
30 | 42 |  |
31 | 43 |
|
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. |
35 | 47 |
|
36 | 48 | ### Splunk |
37 | 49 | 1. In Splunk, open the Add-on |
38 | 50 |
|
39 | 51 |  |
40 | 52 |
|
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 |
45 | 60 |
|
46 | 61 | 3. Optionally, configure logging level and proxy information on the associated tabs. |
47 | 62 | 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. |
49 | 64 |
|
50 | 65 | ## 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. |
52 | 67 |
|
53 | 68 | Optional parameters are supported: |
54 | 69 |
|
| 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. |
55 | 71 | - **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). |
57 | 73 | - **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. |
58 | 74 | - **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. |
59 | 75 |
|
@@ -83,15 +99,15 @@ Power Query Example 1: `| dataset method=powerquery search="dataset = \"accesslo |
83 | 99 |
|
84 | 100 |  |
85 | 101 |
|
86 | | -Power Query Example 2: `| dataset method=powerQuery search="$serverHost == 'cloudWatchLogs' |
| 102 | +Power Query Example 2: `| dataset account=emea method=powerQuery search="$serverHost == 'cloudWatchLogs' |
87 | 103 | | parse 'RequestId: $RID$ Duration: $DUR$ ms Billed Duration: $BDUR$ ms Memory Size: $MEM$ MB Max Memory Used: $UMEM$ MB' |
88 | 104 | | let deltaDUR= BDUR - DUR, deltaMEM = MEM - UMEM |
89 | 105 | | sort -DUR |
90 | 106 | | columns 'Request ID' = RID, 'Duration(ms)' = DUR, 'Charged delta (ms)' = deltaDUR, 'Used Memory (MB)' = UMEM, 'Charged delta Memory (MB)' = deltaMEM" starttime=5m` |
91 | 107 |
|
92 | 108 | Facet Query Example: |
93 | 109 | ` |
94 | | -| dataset method=facet search="serverHost = *" field=serverHost maxcount=25 |
| 110 | +| dataset account=* method=facet search="serverHost = *" field=serverHost maxcount=25 |
95 | 111 | | spath |
96 | 112 | | table value, count |
97 | 113 | ` |
@@ -151,12 +167,14 @@ For use cases requiring data indexed in Splunk, optional inputs are provided uti |
151 | 167 | An alert action allows sending an event to the DataSet [addEvents API](https://app.scalyr.com/help/api#addEvents). |
152 | 168 |
|
153 | 169 | ## 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). |
155 | 173 |
|
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`. |
157 | 175 |
|
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. |
159 | 177 |
|
160 | 178 | ##### 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). |
162 | 180 | Splunk is a trademark or registered trademark of Splunk Inc. in the United States and other countries. |
0 commit comments