All Apps and Add-ons

Where is the payload for a WebHook

blago
Engager

I would like to use Splunk WebHook Action Trigger to send a webhook to slack.
So in order to be able to do that I need to be able to send a post and a payload with the WebHook.
But when I create a WebHook in Splunk I can't find where is the place to enter the payload?
All I can enter its URL.

0 Karma

jhedgpeth
Path Finder

Answer copied from: http://dev.splunk.com/view/dev-guide/SP-CAAAE7A

For a webhook, the POST request's JSON data payload includes the search ID (SID) for the search that triggered the alert, the search owner and app, and the first results row from the search that triggered the alert. Here's an example JSON data packet:

{
    "result": {
        "user": "nick",
        "client_ip": "10.4.0.28",
        "status": "failure",
        "reason": "user-initiated"
    },
    "sid": "scheduler__admin__search__W2_at_1427942640_178",
    "results_link": "http:// splunk.local:8000/app/search/@go?sid=scheduler__admin__search__W2_at_1427942640_178",
    "search_name": Failed_Login_Attempts,
    "owner": "admin",
    "app": "search"
}

Be aware that the contents of the "result" key will always vary, depending on the search that is triggering the alert action. However, the "result" key will always be followed by the "sid", "results_link", "search_name", "owner", and "app" keys, in that order. In the case of the PAS simulated users add-on, the only thing crucial for our purposes is the username included in the endpoint. The content of the JSON packet is ignored.

0 Karma

tnguyen31
New Member

Does this mean that the payload cannot be modified at all?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...