<?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 Re: Alert action script returned error codes on webhook alert. in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Alert-action-script-returned-error-codes-on-webhook-alert/m-p/516514#M9572</link>
    <description>&lt;P&gt;Did you manage to find a resolution?&lt;/P&gt;</description>
    <pubDate>Thu, 27 Aug 2020 13:25:10 GMT</pubDate>
    <dc:creator>kilianw</dc:creator>
    <dc:date>2020-08-27T13:25:10Z</dc:date>
    <item>
      <title>Alert action script returned error codes on webhook alert.</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-action-script-returned-error-codes-on-webhook-alert/m-p/463409#M8235</link>
      <description>&lt;P&gt;I have set up an alert using webhooks and they have not been firing.&lt;/P&gt;
&lt;P&gt;I have set the notification to also show up in triggered alerts to make sure that the alert was in fact firing. When looking through the logs via &lt;CODE&gt;index=_* webhook action=webhook&lt;/CODE&gt; I found some errors, which I cannot figure out how to remediate:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;event_message: action=webhook - Alert action script returned error code=3&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;event_message: action=webhook - Alert action script completed in duration=64 ms with exit code=3&lt;/CODE&gt;&lt;BR /&gt;&lt;CODE&gt;event_message: action=webhook STDERR - Unexpected error: POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str.&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I realize that the last one is a Python error, which I found some information on here: &lt;A href="https://stackoverflow.com/questions/30760728/python-3-urllib-produces-typeerror-post-data-should-be-bytes-or-an-iterable-of" target="_blank"&gt;stackoverflow - Python 3 urllib produces TypeErr...&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I guess what I am wondering is if this is something that I might be doing wrong? Or is something broken on the cloud platform?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 17:16:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-action-script-returned-error-codes-on-webhook-alert/m-p/463409#M8235</guid>
      <dc:creator>n0vsec</dc:creator>
      <dc:date>2020-06-09T17:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Alert action script returned error codes on webhook alert.</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-action-script-returned-error-codes-on-webhook-alert/m-p/516514#M9572</link>
      <description>&lt;P&gt;Did you manage to find a resolution?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 13:25:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-action-script-returned-error-codes-on-webhook-alert/m-p/516514#M9572</guid>
      <dc:creator>kilianw</dc:creator>
      <dc:date>2020-08-27T13:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Alert action script returned error codes on webhook alert.</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-action-script-returned-error-codes-on-webhook-alert/m-p/517047#M9573</link>
      <description>&lt;P&gt;So apparently at some point in time there was an update to our Splunk Cloud instance that broke webhooks, the only way to fix this was to put a ticket in and revert to Python 2.7 until the following update.&amp;nbsp; Not the best solution I would say, but everything is working for now.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 15:39:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-action-script-returned-error-codes-on-webhook-alert/m-p/517047#M9573</guid>
      <dc:creator>n0vsec</dc:creator>
      <dc:date>2020-08-31T15:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Alert action script returned error codes on webhook alert.</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-action-script-returned-error-codes-on-webhook-alert/m-p/520297#M9706</link>
      <description>&lt;P&gt;Downgrading python version wasn't an option, so we are forking the webhook code and applying a fix to /etc/apps/alert_webhook/bin/webhook.py&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 10:12:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-action-script-returned-error-codes-on-webhook-alert/m-p/520297#M9706</guid>
      <dc:creator>kilianw</dc:creator>
      <dc:date>2020-09-18T10:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Alert action script returned error codes on webhook alert.</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-action-script-returned-error-codes-on-webhook-alert/m-p/560297#M10669</link>
      <description>&lt;P&gt;There is a workaround that worked for me without reverting back python version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Go to the following location &amp;lt; Splunk\etc\apps\alert_webhook\bin&amp;gt; and you will find the webhook python script.&lt;/P&gt;&lt;P&gt;Add the line I have highlighted below. Then restart Splunk.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sutanunandigram_0-1626854719136.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15180i27F59510947A852A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sutanunandigram_0-1626854719136.png" alt="sutanunandigram_0-1626854719136.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 08:06:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-action-script-returned-error-codes-on-webhook-alert/m-p/560297#M10669</guid>
      <dc:creator>sutanunandigram</dc:creator>
      <dc:date>2021-07-21T08:06:02Z</dc:date>
    </item>
  </channel>
</rss>

