<?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 Custom Script to capture splunk alert message in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Custom-Script-to-capture-splunk-alert-message/m-p/517845#M9613</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have created an alert for an event in real-time. For example, send me an alert if a user is not able to log in 3 times.&lt;/P&gt;&lt;P&gt;On the above event, I have created an alert action. Here I want to trigger a custom script.&lt;/P&gt;&lt;P&gt;The purpose of this Python script will be to capture the error message and send it to a different application using Key Based authentication.&lt;/P&gt;&lt;P&gt;However, I am not able to fetch the error message.&lt;/P&gt;&lt;P&gt;Using sys.argv gives me the parameters but the error message is encoded. Can anyone assist me here, how can I extract the error message from the event triggering the alert?&lt;/P&gt;</description>
    <pubDate>Fri, 04 Sep 2020 02:43:50 GMT</pubDate>
    <dc:creator>saurabhray25</dc:creator>
    <dc:date>2020-09-04T02:43:50Z</dc:date>
    <item>
      <title>Custom Script to capture splunk alert message</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Script-to-capture-splunk-alert-message/m-p/517845#M9613</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have created an alert for an event in real-time. For example, send me an alert if a user is not able to log in 3 times.&lt;/P&gt;&lt;P&gt;On the above event, I have created an alert action. Here I want to trigger a custom script.&lt;/P&gt;&lt;P&gt;The purpose of this Python script will be to capture the error message and send it to a different application using Key Based authentication.&lt;/P&gt;&lt;P&gt;However, I am not able to fetch the error message.&lt;/P&gt;&lt;P&gt;Using sys.argv gives me the parameters but the error message is encoded. Can anyone assist me here, how can I extract the error message from the event triggering the alert?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 02:43:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Script-to-capture-splunk-alert-message/m-p/517845#M9613</guid>
      <dc:creator>saurabhray25</dc:creator>
      <dc:date>2020-09-04T02:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Script to capture splunk alert message</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Script-to-capture-splunk-alert-message/m-p/518141#M9621</link>
      <description>&lt;P&gt;Search results will be part of the "Path to file containing the search results" (arg 8 ) and you might need to open and read the content of the file in your custom script.&lt;/P&gt;&lt;P&gt;Reference&amp;nbsp; : &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.6/Alert/Configuringscriptedalerts" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.6/Alert/Configuringscriptedalerts&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please note that the run a script alert action is deprecated officially. Please refer to the below documentation to convert to Custom alert action framework&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.6/AdvancedDev/CustomAlertConvertScripted" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.6/AdvancedDev/CustomAlertConvertScripted&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 04:00:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Script-to-capture-splunk-alert-message/m-p/518141#M9621</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-09-07T04:00:41Z</dc:date>
    </item>
  </channel>
</rss>

