You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide shows you how to connect HPE GreenLake webhooks with [Splunk](https://www.splunk.com/). Splunk is a data platform that collects, indexes, and analyzes machine-generated data to provide insights for various purposes, including security monitoring, IT operations, and business analytics. When the two are connected, you will be able to see your HPE GreenLake events through Splunk for improved data monitoring and analysis.
@@ -112,14 +113,16 @@ Let's create a custom REST endpoint handler in Python to handle the HPE GreenLak
112
113
113
114
### Directory structure
114
115
115
-
`splunk_hpe_webhook_app/
116
+
```markdown
117
+
splunk_hpe_webhook_app/
116
118
├── bin/
117
119
│ └── hpe_webhook_handler.py
118
120
├── default/
119
121
│ ├── restmap.conf
120
122
│ └── web.conf
121
123
└── metadata/
122
-
└── default.meta`
124
+
└── default.meta
125
+
```
123
126
124
127
### Python handler (bin/hpe_webhook_handler.py)
125
128
@@ -236,29 +239,35 @@ class HPEWebhookHandler(BaseRestHandler):
236
239
237
240
#### default/restmap.conf
238
241
239
-
`[script:hpe_webhook_handler]`
240
-
`match = /hpe/webhook`
241
-
`script = hpe_webhook_handler.py`
242
-
`scripttype = persist`
243
-
`handler = hpe_webhook_handler.HPEWebhookHandler`
244
-
`requireAuthentication = false`
245
-
`output_modes = json`
246
-
`passPayload = true`
247
-
`passHttpHeaders = true`
248
-
`passHttpCookies = false`
242
+
```markdown
243
+
[script:hpe_webhook_handler]
244
+
match = /hpe/webhook
245
+
script = hpe_webhook_handler.py
246
+
scripttype = persist
247
+
handler = hpe_webhook_handler.HPEWebhookHandler
248
+
requireAuthentication = false
249
+
output_modes = json
250
+
passPayload = true
251
+
passHttpHeaders = true
252
+
passHttpCookies = false
253
+
```
249
254
250
255
#### default/web.conf
251
256
252
-
`[expose:hpe_webhook_handler]
257
+
```markdown
258
+
[expose:hpe_webhook_handler]
253
259
pattern = hpe/webhook
254
260
methods = POST`
261
+
```
255
262
256
263
#### metadata/default.meta
257
264
258
-
`[restmap/hpe_webhook_handler]
265
+
```markdown
266
+
[restmap/hpe_webhook_handler]
259
267
export = system
260
268
[views]
261
269
export = system`
270
+
```
262
271
263
272
## Configuring Splunk HTTP Event Collector (HEC)
264
273
@@ -292,7 +301,7 @@ The complete integration flow works as follows:
292
301
293
302
* Deploy the custom Splunk endpoint handler using the above HPE webhook handler Python script.
294
303
* Make sure to set HEC token and webhook secret in the Python script.
295
-
* Register the webhook handler URL with HPE GreenLake: <https://your-splunk-instance:8089/servicesNS/-/your_app/hpe/webhook>
304
+
* 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)``
296
305
297
306
> 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
298
307
@@ -306,10 +315,7 @@ The complete integration flow works as follows:
1. Verify custom endpoint: Test your custom REST endpoint using curl:
329
335
330
-
`curl -X POST `[`https://your-splunk-instance:8089/servicesNS/-/your_app/hpe/webhook`](https://your-splunk-instance:8089/servicesNS/-/your_app/hpe/webhook)` \`
0 commit comments