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
Get Updates on the Splunk Community!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...