Skip to content

Commit 910f1fc

Browse files
committed
Update Blog “integrating-hpe-greenlake-webhooks-with-splunk”
1 parent 5eb7e26 commit 910f1fc

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

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

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,12 @@ You need to create an API token to use HEC via its API. You can do this from:
275275

276276
1.    **Settings > Data Inputs > HTTP Event Collector**
277277

278-
**2.**    Select **New token.** Use this token to update the Python handler script line
278+
2.    Select **New token.** Use this token to update the Python handler script line
279279

280280
![Data inputs settings ](/img/dccf7431-b83b-4799-a795-25bccc7637db.png "Data inputs settings ")
281281

282282
Your final configuration should look like this:
283283

284-
285-
286284
![HEC final configuration ](/img/03af2f59-ab50-443b-ae93-90d274738317.png "HEC final configuration ")
287285

288286
Verify your global settings so that they match the following:
@@ -295,14 +293,37 @@ This allows you to get your HEC endpoint, which is used in the Python handler to
295293

296294
 Don’t forget to modify the Python handler (shown above) line 7 accordingly.
297295

296+
3. Generate an API key (Splunk session key)
297+
298+
```shell
299+
curl -k https://your-splunk-instance:8089/services/auth/login \
300+
--data-urlencode username=YOUR_USERNAME \
301+
--data-urlencode 'password=YOUR_PASSWORD’
302+
```
303+
304+
The response will be:
305+
306+
```
307+
<response>
308+
<sessionKey>YOUR_SESSION_KEY</sessionKey>
309+
<messages>
310+
<msg code=""></msg>
311+
</messages>
312+
</response>
313+
```
314+
315+
 
316+
298317
## Final integration flow
299318
300319
The complete integration flow works as follows:
301320
302321
1. Initial setup
303322
304323
* Deploy the custom Splunk endpoint handler using the above HPE webhook handler Python script.
305-
* Make sure to set HEC token and webhook secret in the Python script.
324+
* Make sure to set the HEC endpoint in the Python script (line 13)
325+
* Make sure to set the API key (Splunk session key) in the Python script (line 14)
326+
* Make sure to set the HPE GreenLake webhook secret in the Python script (line 15)
306327
* Register the webhook handler URL with HPE GreenLake: [`https://your-splunk-instance:8089/servicesNS/-/your_app/hpe/webhook`](https://your-splunk-instance:8089/servicesNS/-/your_app/hpe/webhook)``
307328
308329
> Note: See [this blog](https://developer.hpe.com/blog/getting-started-with-the-hpe-greenlake-cloud-eventing-framework/) to learn how to register a new webhook handler in HPE GreenLake

0 commit comments

Comments
 (0)