<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Can the webhook payload for an alert be configured? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Can-the-webhook-payload-for-an-alert-be-configured/m-p/284675#M5257</link>
    <description>&lt;P&gt;Is it possible to configure the webhook payload for an alert? I would like to send alerts to BigPanda which requires the payload to contain a specific set of tags in JSON format. There is a BigPanda app for on-prem versions of Splunk, but I'm trying to integrate the SaaS based version. I couldn't find an answer to this in the docs or any other questions on here.&lt;/P&gt;
&lt;P&gt;Second question if its not possible to configure the payload - how can I call a script from the SaaS based instance of Splunk? When I choose this as an option it prompts for a path under $splunk_home, but not sure where that is in the SaaS version.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Steve&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jun 2020 20:56:33 GMT</pubDate>
    <dc:creator>strayhud</dc:creator>
    <dc:date>2020-06-09T20:56:33Z</dc:date>
    <item>
      <title>Can the webhook payload for an alert be configured?</title>
      <link>https://community.splunk.com/t5/Alerting/Can-the-webhook-payload-for-an-alert-be-configured/m-p/284675#M5257</link>
      <description>&lt;P&gt;Is it possible to configure the webhook payload for an alert? I would like to send alerts to BigPanda which requires the payload to contain a specific set of tags in JSON format. There is a BigPanda app for on-prem versions of Splunk, but I'm trying to integrate the SaaS based version. I couldn't find an answer to this in the docs or any other questions on here.&lt;/P&gt;
&lt;P&gt;Second question if its not possible to configure the payload - how can I call a script from the SaaS based instance of Splunk? When I choose this as an option it prompts for a path under $splunk_home, but not sure where that is in the SaaS version.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Steve&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 20:56:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Can-the-webhook-payload-for-an-alert-be-configured/m-p/284675#M5257</guid>
      <dc:creator>strayhud</dc:creator>
      <dc:date>2020-06-09T20:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can the webhook payload for an alert be configured?</title>
      <link>https://community.splunk.com/t5/Alerting/Can-the-webhook-payload-for-an-alert-be-configured/m-p/284676#M5258</link>
      <description>&lt;P&gt;You have to go through a support ticket to get support to install Splunk apps for you into a Splunk cloud instance. &lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2017 12:08:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Can-the-webhook-payload-for-an-alert-be-configured/m-p/284676#M5258</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2017-02-11T12:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can the webhook payload for an alert be configured?</title>
      <link>https://community.splunk.com/t5/Alerting/Can-the-webhook-payload-for-an-alert-be-configured/m-p/284677#M5259</link>
      <description>&lt;P&gt;as @starcher said you need to check the splunkbase first and ask them to install the app if it is there.  Splunkbase is a catalogue of cloud add-ons. If it is not there you need to fire another ticket, the application should go through the vetting process, and you will get a vetting report. &lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 12:15:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Can-the-webhook-payload-for-an-alert-be-configured/m-p/284677#M5259</guid>
      <dc:creator>edikmkoyan</dc:creator>
      <dc:date>2019-09-12T12:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can the webhook payload for an alert be configured?</title>
      <link>https://community.splunk.com/t5/Alerting/Can-the-webhook-payload-for-an-alert-be-configured/m-p/284678#M5260</link>
      <description>&lt;P&gt;Hi, can anyone answer the first original question of; is it possible to configure the Webhook JSON payload so that we can send our own payload and not just the default payload?  Thank you.   - - -CraigR&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 05:31:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Can-the-webhook-payload-for-an-alert-be-configured/m-p/284678#M5260</guid>
      <dc:creator>mobiuscraigr</dc:creator>
      <dc:date>2020-05-08T05:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can the webhook payload for an alert be configured?</title>
      <link>https://community.splunk.com/t5/Alerting/Can-the-webhook-payload-for-an-alert-be-configured/m-p/617255#M14434</link>
      <description>&lt;P&gt;I dont know if this is a bit overkill but you could write a python app to receive the wehook, and then recompose the json - I've been messing around with this today.&amp;nbsp; So you'd end up with a gateway - but a stateless one - here's some code - it's a spike, so dont take it too literally:&lt;/P&gt;&lt;P&gt;It creates an endpoint &lt;A href="http://localhost:5000/spluink" target="_blank"&gt;http://localhost:5000/splunk&lt;/A&gt; were you can take the use in splunk as a webhook target and take the original json payload and change its shape and post it to a discord channel (no cost etc.)&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from asyncio.log import logger
from email import header
from urllib import response
import requests
import json
from loguru import logger
from flask import Flask, request, json

app = Flask(__name__)

def discord_message(url, message):
    headers = {
        "Accept": "application/json",
        "Content-Type": "application/json",
        "X-HTTP-Method-Override": "PUT"
    }
    data = {
     "content": message
    }
    payload = json.dumps(data)
    logger.info(f'Sending webhook message {message}')
    response = requests.post(url, headers=headers, data=payload)
    logger.info(f'{response}')


@app.route('/splunk',methods=['POST'])
def splunk():
    data = request.json
    logger.debug(data)
    discord_webhook = "https://discordapp.com/api/webhooks/SOME_WEBHOOK!!"
    message = (f'Attack detected see search: {data["results_link"]}')
    discord_message(discord_webhook, message)
    logger.debug(message)
    return data


def main():
  app.run(debug=True, host="0.0.0.0")


if __name__ == "__main__":
    main()

&lt;/LI-CODE&gt;&lt;P&gt;if there's a better way of doing this Id really be interested &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ... hmm thinking about it an aws have some really interesting event bridge logic you could prob use and plumb it into a lambda&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2022 15:00:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Can-the-webhook-payload-for-an-alert-be-configured/m-p/617255#M14434</guid>
      <dc:creator>aymonfoa</dc:creator>
      <dc:date>2022-10-15T15:00:13Z</dc:date>
    </item>
  </channel>
</rss>

