Skip to content

Commit 77b1cba

Browse files
committed
Update Blog “integrating-hpe-greenlake-webhooks-with-splunk”
1 parent c08a3cb commit 77b1cba

File tree

1 file changed

+20
-25
lines changed

1 file changed

+20
-25
lines changed

content/blog/integrating-hpe-greenlake-webhooks-with-splunk.md

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,26 @@ You can install and configure the endpoint handler directly on your Splunk Enter
107107

108108
[Splunk Cloud has extra security controls](https://docs.splunk.com/Documentation/SplunkCloud/latest/RESTTUT/RESTandCloud), so you might need to take additional steps to allow your helper to communicate with the Splunk REST API.
109109

110+
## Generate an Splunk REST API key
111+
112+
In order to use the custom REST endpoint in Splunk, you need to get an API key which HPE GreenLake will use to authenticate against Splunk when initially setting up the webhook and sending events. You can use the following cURL command to generate a key.
113+
114+
```shell
115+
curl -k https://your-splunk-instance:8089/services/auth/login \
116+
--data-urlencode username=YOUR_USERNAME \
117+
--data-urlencode 'password=YOUR_PASSWORD’
118+
```
119+
120+
The response will be:
121+
122+
```
123+
<response>
124+
<sessionKey>YOUR_SESSION_KEY</sessionKey>
125+
<messages>
126+
<msg code=""></msg>
127+
</messages>
128+
</response>
129+
```
110130
## Sample Python handler
111131
112132
Let's create a custom REST endpoint handler in Python to handle the HPE GreenLake webhook validation and forwards events to Splunk HEC, once validated.
@@ -291,31 +311,6 @@ This allows you to get your HEC endpoint, which is used in the Python handler to
291311
292312
`<https://<splunk-host>>:8088/services/collector/event`
293313
294-
 Don’t forget to modify the Python handler (shown above) line 7 accordingly.
295-
296-
### Generate an Splunk REST API key
297-
298-
In order to use the custom REST endpoint in Splunk, you need to get an API key which HPE GreenLake will use to authenticate against Splunk when setiing up the webhook and sending events. You can use the following cURL command to generate a key.
299-
300-
```shell
301-
curl -k https://your-splunk-instance:8089/services/auth/login \
302-
--data-urlencode username=YOUR_USERNAME \
303-
--data-urlencode 'password=YOUR_PASSWORD’
304-
```
305-
306-
The response will be:
307-
308-
```
309-
<response>
310-
<sessionKey>YOUR_SESSION_KEY</sessionKey>
311-
<messages>
312-
<msg code=""></msg>
313-
</messages>
314-
</response>
315-
```
316-
317-
 
318-
319314
## Final integration flow
320315
321316
The complete integration flow works as follows:

0 commit comments

Comments
 (0)