Skip to content

Commit 5ebaf83

Browse files
authored
splunk 3.0.5 - new sdk (#3151)
1 parent 4b36986 commit 5ebaf83

File tree

6 files changed

+106
-85
lines changed

6 files changed

+106
-85
lines changed

plugins/splunk/.CHECKSUM

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"spec": "3b8e2c4c8554a574bccac7b24b1cb611",
3-
"manifest": "fd83cac2d710e230498e31f58e78bb35",
4-
"setup": "7707e196202a60185a01a4dd69d56f83",
2+
"spec": "771ddbfa431640df013578618bbe2a4f",
3+
"manifest": "0476300dd94fa9ffbc21303a25b00ba4",
4+
"setup": "c859cdb5d1e4b29d0d37e0c08f117c15",
55
"schemas": [
66
{
77
"identifier": "create_saved_search/schema.py",

plugins/splunk/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:5.3.2
1+
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.2.5
22

33
LABEL organization=rapid7
44
LABEL sdk=python
@@ -12,7 +12,7 @@ RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
1212

1313
ADD . /python/src
1414

15-
RUN python setup.py build && python setup.py install
15+
RUN pip install .
1616

1717
# User to run plugin code. The two supported users are: root, nobody
1818
USER nobody

plugins/splunk/bin/icon_splunk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ from sys import argv
66

77
Name = "Splunk"
88
Vendor = "rapid7"
9-
Version = "3.0.4"
10-
Description = "The Splunk plugin allows you to search, monitor, and analyze machine data"
9+
Version = "3.0.5"
10+
Description = "[Splunk](https://www.splunk.com/) captures, indexes, and correlates real-time data in a searchable repository from which it can generate graphs, reports, alerts, dashboards, and visualizations. This plugin allows you to interact with Splunk by hooking alerts to trigger InsightConnect workflows, run (saved) searches, retrieve search results, and even insert data back into Splunk from a workflow"
1111

1212

1313
def main():

plugins/splunk/help.md

Lines changed: 69 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,41 @@
11
# Description
22

3-
[Splunk](https://www.splunk.com/) captures, indexes, and correlates real-time data in a searchable repository from which it can generate graphs, reports, alerts, dashboards, and visualizations. This plugin allows you to interact with Splunk by hooking alerts to trigger InsightConnect workflows, run (saved) searches, retrieve search results, and even insert data back into Splunk from a workflow.
4-
5-
To get Splunk alerts or send saved searches to InsightConnect, please use the [InsightConnect Splunk App](https://splunkbase.splunk.com/app/4673/).
3+
[Splunk](https://www.splunk.com/) captures, indexes, and correlates real-time data in a searchable repository from which it can generate graphs, reports, alerts, dashboards, and visualizations. This plugin allows you to interact with Splunk by hooking alerts to trigger InsightConnect workflows, run (saved) searches, retrieve search results, and even insert data back into Splunk from a workflow
64

75
# Key Features
8-
9-
* Run a search query to get the results from your Splunk instance
10-
* Display search results from a specified job
11-
* Run, create, delete, and list saved searches to store and rerun queries over time
12-
* List and modify saved search properties to view and update your reusable queries
13-
* Get saved search job history to retrieve the history of a specified saved search
6+
7+
* Run a search query to get the results from your Splunk instance
8+
* Display search results from a specified job
9+
* Run, create, delete, and list saved searches to store and rerun queries over time
10+
* List and modify saved search properties to view and update your reusable queries
11+
* Get saved search job history to retrieve the history of a specified saved search
1412
* Insert events into an index to update your Splunk instance
1513

1614
# Requirements
17-
18-
* Administrative credentials
19-
* Splunk host IP address or hostname
15+
16+
* Administrative credentials
17+
* Splunk host IP address or hostname
2018
* Splunk API port
2119

2220
# Supported Product Versions
23-
21+
2422
* Splunk SDK 1.7.4
2523

2624
# Documentation
2725

2826
## Setup
2927

30-
To connect to Splunk, you must have valid credentials and network access to the Splunk API port (Splunk's default is TCP/8089). This plugin supports both the Free and Enterprise Splunk licenses.
28+
The connection configuration accepts the following parameters:
3129

32-
The connection configuration accepts the following parameters:
30+
|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip|
31+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
32+
|credentials|credential_username_password|None|False|Username and password|None|{"username":"ExampleUser","password":"ExamplePassword"}|None|None|
33+
|host|string|None|True|Hostname or IP address of Splunk server to connect to|None|splunk.example.com|None|None|
34+
|license|string|None|True|License type for Splunk host|["Enterprise", "Free"]|Free|None|None|
35+
|port|integer|8089|True|Port the Splunk API is listening on. Default is 8089|None|8089|None|None|
36+
|ssl_verify|boolean|None|True|Verify server's SSL/TLS certificate|None|True|None|None|
37+
|use_ssl|boolean|None|True|Whether or not to use SSL|None|True|None|None|
3338

34-
|Name|Type|Default|Required|Description|Enum|Example|
35-
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
36-
|credentials|credential_username_password|None|False|Username and password|None|{"username":"ExampleUser","password":"ExamplePassword"}|
37-
|host|string|None|True|Hostname or IP address of Splunk server to connect to|None|splunk.example.com|
38-
|license|string|None|True|License type for Splunk host|["Enterprise", "Free"]|Free|
39-
|port|integer|8089|True|Port the Splunk API is listening on. Default is 8089|None|8089|
40-
|ssl_verify|boolean|None|True|Verify server's SSL/TLS certificate|None|True|
41-
|use_ssl|boolean|None|True|Whether or not to use SSL|None|True|
42-
4339
Example input:
4440

4541
```
@@ -62,16 +58,16 @@ Example input:
6258

6359

6460
#### Create Saved Search
65-
61+
6662
This action is used to creates a saved search
6763

6864
##### Input
6965

70-
|Name|Type|Default|Required|Description|Enum|Example|
71-
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
72-
|properties|object|None|False|JSON object containing additional properties to save with the saved search|None|{"description":"ExampleDescription","is_scheduled":true}|
73-
|query|string|None|True|Search query|None|search *|
74-
|saved_search_name|string|None|True|Name to give to the saved search|None|ExampleSavedSearchName|
66+
|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip|
67+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
68+
|properties|object|None|False|JSON object containing additional properties to save with the saved search|None|{"description":"ExampleDescription","is_scheduled":true}|None|None|
69+
|query|string|None|True|Search query|None|search *|None|None|
70+
|saved_search_name|string|None|True|Name to give to the saved search|None|ExampleSavedSearchName|None|None|
7571

7672
Example input:
7773

@@ -106,14 +102,14 @@ Example output:
106102
```
107103

108104
#### Delete Saved Search
109-
105+
110106
This action is used to deletes a saved search
111107

112108
##### Input
113109

114-
|Name|Type|Default|Required|Description|Enum|Example|
115-
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
116-
|saved_search_name|string|None|True|Name of the saved search to delete|None|ExampleSavedSearchName|
110+
|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip|
111+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
112+
|saved_search_name|string|None|True|Name of the saved search to delete|None|ExampleSavedSearchName|None|None|
117113

118114
Example input:
119115

@@ -138,15 +134,15 @@ Example output:
138134
```
139135

140136
#### Display Search Results
141-
137+
142138
This action is used to displays the search results from a job
143139

144140
##### Input
145141

146-
|Name|Type|Default|Required|Description|Enum|Example|
147-
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
148-
|job_id|string|None|True|The Job ID to look up results for|None|12345|
149-
|timeout|number|None|True|Duration of time, in seconds, to wait for retrieving results|None|5|
142+
|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip|
143+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
144+
|job_id|string|None|True|The Job ID to look up results for|None|12345|None|None|
145+
|timeout|number|None|True|Duration of time, in seconds, to wait for retrieving results|None|5|None|None|
150146

151147
Example input:
152148

@@ -185,14 +181,14 @@ Example output:
185181
```
186182

187183
#### Get Saved Search Job History
188-
184+
189185
This action is used to returns the job history of a specified saved search
190186

191187
##### Input
192188

193-
|Name|Type|Default|Required|Description|Enum|Example|
194-
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
195-
|saved_search_name|string|None|True|Name of a saved search|None|ExampleSavedSearchName|
189+
|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip|
190+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
191+
|saved_search_name|string|None|True|Name of a saved search|None|ExampleSavedSearchName|None|None|
196192

197193
Example input:
198194

@@ -232,18 +228,18 @@ Example output:
232228
```
233229

234230
#### Insert
235-
231+
236232
This action is used to insert events into an index
237233

238234
##### Input
239235

240-
|Name|Type|Default|Required|Description|Enum|Example|
241-
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
242-
|event|string|None|True|The event to submit|None|User logged in|
243-
|host|string|None|False|The source host|None|example_host|
244-
|index|string|None|True|Name of index|None|ExampleIndexName|
245-
|source|string|None|False|Source of the event|None|ExampleEventSource|
246-
|source_type|string|None|False|The optional source type value of the event|None|ExampleEventSourceType|
236+
|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip|
237+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
238+
|event|string|None|True|The event to submit|None|User logged in|None|None|
239+
|host|string|None|False|The source host|None|example_host|None|None|
240+
|index|string|None|True|Name of index|None|ExampleIndexName|None|None|
241+
|source|string|None|False|Source of the event|None|ExampleEventSource|None|None|
242+
|source_type|string|None|False|The optional source type value of the event|None|ExampleEventSourceType|None|None|
247243

248244
Example input:
249245

@@ -272,7 +268,7 @@ Example output:
272268
```
273269

274270
#### List Saved Searches
275-
271+
276272
This action is used to lists all saved searches
277273

278274
##### Input
@@ -329,15 +325,15 @@ Example output:
329325
```
330326

331327
#### Modify Saved Search Properties
332-
328+
333329
This action is used to modifies the properties of a saved search
334330

335331
##### Input
336332

337-
|Name|Type|Default|Required|Description|Enum|Example|
338-
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
339-
|properties|object|None|True|JSON object of properties and values to modify|None|{"description":"ExampleDescription","is_scheduled":true}|
340-
|saved_search_name|string|None|True|Name of saved search to display properties for|None|ExampleSavedSearchName|
333+
|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip|
334+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
335+
|properties|object|None|True|JSON object of properties and values to modify|None|{"description":"ExampleDescription","is_scheduled":true}|None|None|
336+
|saved_search_name|string|None|True|Name of saved search to display properties for|None|ExampleSavedSearchName|None|None|
341337

342338
Example input:
343339

@@ -366,14 +362,14 @@ Example output:
366362
```
367363

368364
#### Run Saved Search
369-
365+
370366
This action is used to runs a saved search
371367

372368
##### Input
373369

374-
|Name|Type|Default|Required|Description|Enum|Example|
375-
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
376-
|saved_search_name|string|None|True|Name of saved search to run|None|ExampleSavedSearchName|
370+
|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip|
371+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
372+
|saved_search_name|string|None|True|Name of saved search to run|None|ExampleSavedSearchName|None|None|
377373

378374
Example input:
379375

@@ -398,16 +394,16 @@ Example output:
398394
```
399395

400396
#### Search
401-
397+
402398
This action is used to run a query
403399

404400
##### Input
405401

406-
|Name|Type|Default|Required|Description|Enum|Example|
407-
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
408-
|count|integer|100|True|The maximum number of results to return. Set to 0 for unlimited results|None|100|
409-
|query|string|None|True|Run a search query|None|search *|
410-
|search_timeframe|string|None|False|The specified timeframe for the search. Default searches over all time. Separated with dash, in the form of Unix epoch timestamps, e.g. 1498824598-1598824598. If end time is left blank, it defaults to the current time|None|1598984278-1598984478|
402+
|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip|
403+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
404+
|count|integer|100|True|The maximum number of results to return. Set to 0 for unlimited results|None|100|None|None|
405+
|query|string|None|True|Run a search query|None|search *|None|None|
406+
|search_timeframe|string|None|False|The specified timeframe for the search. Default searches over all time. Separated with dash, in the form of Unix epoch timestamps, e.g. 1498824598-1598824598. If end time is left blank, it defaults to the current time|None|1598984278-1598984478|None|None|
411407

412408
Example input:
413409

@@ -441,14 +437,14 @@ Example output:
441437
```
442438

443439
#### View Saved Search Properties
444-
440+
445441
This action is used to returns the properties for a saved search
446442

447443
##### Input
448444

449-
|Name|Type|Default|Required|Description|Enum|Example|
450-
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
451-
|saved_search_name|string|None|True|Name of saved search to display properties for|None|ExampleSavedSearchName|
445+
|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip|
446+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
447+
|saved_search_name|string|None|True|Name of saved search to display properties for|None|ExampleSavedSearchName|None|None|
452448

453449
Example input:
454450

@@ -491,6 +487,7 @@ Example output:
491487

492488
# Version History
493489

490+
* 3.0.5 - Updated SDK to latest version (6.2.5)
494491
* 3.0.4 - Updated SDK to latest version | Refreshed the plugin | Added unittests | Updated packages
495492
* 3.0.3 - Add `search_timeframe` input to Search action
496493
* 3.0.2 - Fix issue with typos in help.md and plugin description
@@ -515,5 +512,4 @@ Example output:
515512

516513
## References
517514

518-
* [Splunk](https://www.splunk.com/)
519-
* [InsightConnect Splunk App](https://splunkbase.splunk.com/app/4673/)
515+
* [Splunk](https://www.splunk.com/)

plugins/splunk/plugin.spec.yaml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ extension: plugin
33
products: [insightconnect]
44
name: splunk
55
title: Splunk
6-
description: The Splunk plugin allows you to search, monitor, and analyze machine data
7-
version: 3.0.4
6+
description: "[Splunk](https://www.splunk.com/) captures, indexes, and correlates real-time data in a searchable repository from which it can generate graphs, reports, alerts, dashboards, and visualizations. This plugin allows you to interact with Splunk by hooking alerts to trigger InsightConnect workflows, run (saved) searches, retrieve search results, and even insert data back into Splunk from a workflow"
7+
version: 3.0.5
88
connection_version: 3
99
vendor: rapid7
1010
support: rapid7
@@ -21,10 +21,16 @@ requirements:
2121
- Administrative credentials
2222
- Splunk host IP address or hostname
2323
- Splunk API port
24+
troubleshooting:
25+
- "If issues are encountered when using the `Search` action, try prefixing your query with `search`, example: `search index=\"*\" | head 5`."
2426
sdk:
2527
type: slim
26-
version: 5.3.2
28+
version: 6.2.5
2729
user: nobody
30+
links:
31+
- "[Splunk](https://www.splunk.com/)"
32+
references:
33+
- "[Splunk](https://www.splunk.com/)"
2834
resources:
2935
source_url: https://github.com/rapid7/insightconnect-plugins/tree/master/plugins/splunk
3036
license_url: https://github.com/rapid7/insightconnect-plugins/blob/master/LICENSE
@@ -34,6 +40,25 @@ hub_tags:
3440
use_cases: [threat_detection_and_response, reporting_and_analytics, data_utility, alerting_and_notifications]
3541
keywords: [splunk, siem, logs]
3642
features: []
43+
version_history:
44+
- 3.0.5 - Updated SDK to latest version (6.2.5)
45+
- 3.0.4 - Updated SDK to latest version | Refreshed the plugin | Added unittests | Updated packages
46+
- 3.0.3 - Add `search_timeframe` input to Search action
47+
- 3.0.2 - Fix issue with typos in help.md and plugin description
48+
- 3.0.1 - New spec and help.md format for the Extension Library
49+
- 3.0.0 - Remove Komand-specific Alert trigger | Fix invalid output properties | Numerous typographical fixes | Improve error handling | Smaller plugin size due to slim SDK migration | New connection test code
50+
- 2.0.0 - Support SSL Verify option in the Connection | Improve error handling in Connection | Update documentation
51+
- 1.1.0 - Add support for user specified number of results in the Search action
52+
- 1.0.1 - Fix issue where JSON module was not imported in Search action
53+
- 1.0.0 - Update to v2 Python plugin architecture | Support web server mode | Support free Splunk license
54+
- 0.2.4 - SSL bug fix in SDK
55+
- 0.2.3 - UTF-8 encode events in the insert action
56+
- 0.2.2 - Fix bug when using multiple alert names
57+
- 0.2.1 - Bugfix in connection attempts
58+
- 0.2.0 - Add 8 saved search and related actions
59+
- 0.1.2 - Remove logging of username and password
60+
- 0.1.1 - Added poll interval input to Alert trigger
61+
- 0.1.0 - Initial plugin
3762
connection:
3863
host:
3964
title: Host

plugins/splunk/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44

55
setup(name="splunk-rapid7-plugin",
6-
version="3.0.4",
7-
description="The Splunk plugin allows you to search, monitor, and analyze machine data",
6+
version="3.0.5",
7+
description="[Splunk](https://www.splunk.com/) captures, indexes, and correlates real-time data in a searchable repository from which it can generate graphs, reports, alerts, dashboards, and visualizations. This plugin allows you to interact with Splunk by hooking alerts to trigger InsightConnect workflows, run (saved) searches, retrieve search results, and even insert data back into Splunk from a workflow",
88
author="rapid7",
99
author_email="",
1010
url="",

0 commit comments

Comments
 (0)