<?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 Why is triggering an alert not running the script? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330296#M5860</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;It's been two days and I'm trying to solve this problem, I'm quite new to splunk and I want to run a script from a triggred alarm.&lt;/P&gt;

&lt;P&gt;I've configured an alarm to execute two action: &lt;BR /&gt;
1) send an email&lt;BR /&gt;
2) run a script&lt;/P&gt;

&lt;P&gt;I do receive the email but the shell script is not executed, the log file (splunkd.log) shows this error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rt_scheduler__admin__search__RMD5311cfcc34c99c9e6_at_1523539181_68344.1380 command="runshellscript", Script: /opt/splunk/bin/scripts/ exited with status code: 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried Script trouble shooting but it didn't help.&lt;/P&gt;

&lt;P&gt;I'm using the version 6.5.3 of splunk.&lt;/P&gt;

&lt;P&gt;Hope you can help me with this.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Apr 2018 11:46:46 GMT</pubDate>
    <dc:creator>redouane_prx</dc:creator>
    <dc:date>2018-04-13T11:46:46Z</dc:date>
    <item>
      <title>Why is triggering an alert not running the script?</title>
      <link>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330296#M5860</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;It's been two days and I'm trying to solve this problem, I'm quite new to splunk and I want to run a script from a triggred alarm.&lt;/P&gt;

&lt;P&gt;I've configured an alarm to execute two action: &lt;BR /&gt;
1) send an email&lt;BR /&gt;
2) run a script&lt;/P&gt;

&lt;P&gt;I do receive the email but the shell script is not executed, the log file (splunkd.log) shows this error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rt_scheduler__admin__search__RMD5311cfcc34c99c9e6_at_1523539181_68344.1380 command="runshellscript", Script: /opt/splunk/bin/scripts/ exited with status code: 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried Script trouble shooting but it didn't help.&lt;/P&gt;

&lt;P&gt;I'm using the version 6.5.3 of splunk.&lt;/P&gt;

&lt;P&gt;Hope you can help me with this.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 11:46:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330296#M5860</guid>
      <dc:creator>redouane_prx</dc:creator>
      <dc:date>2018-04-13T11:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why is triggering an alert not running the script?</title>
      <link>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330297#M5861</link>
      <description>&lt;P&gt;Hi refer this thread here - &lt;A href="https://answers.splunk.com/answers/329819/alert-manager-script-exit-status-1.html"&gt;https://answers.splunk.com/answers/329819/alert-manager-script-exit-status-1.html&lt;/A&gt;&lt;BR /&gt;
Looks like an issue with the script target . It could be an issue with the privileges that splunk needs to access your  script target&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 18:25:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330297#M5861</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-04-13T18:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why is triggering an alert not running the script?</title>
      <link>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330298#M5862</link>
      <description>&lt;P&gt;I've also seen times when status code 1 was a badly written python script.  wrong number of spaces on a line if I recall correctly.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 20:16:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330298#M5862</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-04-13T20:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is triggering an alert not running the script?</title>
      <link>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330299#M5863</link>
      <description>&lt;P&gt;As mentioned by @DalJeanis, this is most likely related to the script being not correct. Try running it like Splunk would:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Start a Splunk shell: &lt;CODE&gt;/opt/splunk/bin/splunk /bin/bash&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;In this shell start the script: &lt;CODE&gt;/opt/splunk/bin/splunk cmd &amp;lt;scriptnamehere&amp;gt;&lt;/CODE&gt; and see what happens &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 22:31:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330299#M5863</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-04-13T22:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why is triggering an alert not running the script?</title>
      <link>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330300#M5864</link>
      <description>&lt;P&gt;Thank you guys, the problem is solved. the issue indeed was with the script and Splunk shell didn't have the necessary libraries (OPENSSL_1.0.1) to execute it.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 08:52:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330300#M5864</guid>
      <dc:creator>redouane_prx</dc:creator>
      <dc:date>2018-04-16T08:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why is triggering an alert not running the script?</title>
      <link>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330301#M5865</link>
      <description>&lt;P&gt;thanks for providing the solution&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 13:03:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330301#M5865</guid>
      <dc:creator>logloganathan</dc:creator>
      <dc:date>2018-04-16T13:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Why is triggering an alert not running the script?</title>
      <link>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330302#M5866</link>
      <description>&lt;P&gt;where do we need the libraries and which libraries we need to place in order to run the shell script/sql&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 09:45:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Why-is-triggering-an-alert-not-running-the-script/m-p/330302#M5866</guid>
      <dc:creator>sagar0907</dc:creator>
      <dc:date>2019-11-25T09:45:47Z</dc:date>
    </item>
  </channel>
</rss>

