<?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: Change scripted alert script location? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31719#M321</link>
    <description>&lt;P&gt;Doesn't work. Splunk complained if I tried to put a full path in (&lt;CODE&gt;ERROR script - Script location cannot contain "..", "/", or "\"&lt;/CODE&gt;), or just place the script in /etc/ourapp/bin/ or etc/ourapp/bin/scripts (&lt;CODE&gt;ERROR script - Cannot find script at /opt/splunk/bin/scripts/script.sh&lt;/CODE&gt;) - other ideas?&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jan 2011 02:17:46 GMT</pubDate>
    <dc:creator>Jason</dc:creator>
    <dc:date>2011-01-26T02:17:46Z</dc:date>
    <item>
      <title>Change scripted alert script location?</title>
      <link>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31717#M319</link>
      <description>&lt;P&gt;In trying to package up our app into its own app folder, we ran into an issue where it seems Splunk won't accept .. / \ in the script path, and will only look in $SPLUNK_HOME/bin/scripts. This seems oddly contrary to everything else in Splunk, which can be neatly packaged in an app.&lt;/P&gt;

&lt;P&gt;Is there a way to allow alert scripts to reside in $SPLUNK_HOME/etc/ourapp/bin and still be run?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2011 00:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31717#M319</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2011-01-26T00:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Change scripted alert script location?</title>
      <link>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31718#M320</link>
      <description>&lt;P&gt;I believe you can place them in &lt;CODE&gt;$SPLUNK_HOME/etc/ourapp/bin/scripts&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2011 02:00:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31718#M320</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-01-26T02:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Change scripted alert script location?</title>
      <link>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31719#M321</link>
      <description>&lt;P&gt;Doesn't work. Splunk complained if I tried to put a full path in (&lt;CODE&gt;ERROR script - Script location cannot contain "..", "/", or "\"&lt;/CODE&gt;), or just place the script in /etc/ourapp/bin/ or etc/ourapp/bin/scripts (&lt;CODE&gt;ERROR script - Cannot find script at /opt/splunk/bin/scripts/script.sh&lt;/CODE&gt;) - other ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2011 02:17:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31719#M321</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2011-01-26T02:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Change scripted alert script location?</title>
      <link>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31720#M322</link>
      <description>&lt;P&gt;I've tried it once and wasn't able to get it working outside of &lt;CODE&gt;bin/scripts&lt;/CODE&gt;. There's probably no way to this this right now. I've filed an ER back then. You should do this too if you want this to be available sometime in Splunk.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2011 02:59:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31720#M322</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2011-01-26T02:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Change scripted alert script location?</title>
      <link>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31721#M323</link>
      <description>&lt;P&gt;This DOES work, but the documentation is wrong.&lt;/P&gt;

&lt;P&gt;Contrary to what is stated here: &lt;A href="http://wiki.splunk.com/Community:TroubleshootingAlertScripts"&gt;http://wiki.splunk.com/Community:TroubleshootingAlertScripts&lt;/A&gt; and in the README file for each app, you need to put it in etc/apps/&lt;APP&gt;/bin/scripts.&lt;/APP&gt;&lt;/P&gt;

&lt;P&gt;Then, in your alert, don't specify any path, just the name of the script.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2011 19:59:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31721#M323</guid>
      <dc:creator>agent613</dc:creator>
      <dc:date>2011-12-16T19:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Change scripted alert script location?</title>
      <link>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31722#M324</link>
      <description>&lt;P&gt;Thanks agent613 this worked!&lt;BR /&gt;
I'm trying to upvote you but I don't have enough points so I'll repeat what you said and add a bit.&lt;/P&gt;

&lt;P&gt;The script must be in the &lt;STRONG&gt;/bin/scripts folder of the app&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;So for alerts in the search app I put the script I want to run(DoSomethingOnAlert.sh) in&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;/opt/splunk/etc/apps/search/bin/scripts/&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Under a saved search in the alert actions section under&lt;BR /&gt;
"File name of shell script to run"&lt;BR /&gt;
you can only put the filename WITHOUT path&lt;BR /&gt;
(Otherwise you will get the "script location cannot contain" error message in /opt/splunk/var/log/splunk/splunkd.log)&lt;BR /&gt;
so in here i have only the script name:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;DoSomethingOnAlert.sh&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2012 23:49:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31722#M324</guid>
      <dc:creator>huister</dc:creator>
      <dc:date>2012-05-15T23:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Change scripted alert script location?</title>
      <link>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31723#M325</link>
      <description>&lt;P&gt;hmm. this doesn't work for me in splunk 6.0. even with a default.meta that exports everything.&lt;/P&gt;

&lt;P&gt;according to &lt;A href="http://wiki.splunk.com/Community:TroubleshootingAlertScripts"&gt;http://wiki.splunk.com/Community:TroubleshootingAlertScripts&lt;/A&gt;, the script in the app will only be accessible by saved searches in the app's context.&lt;/P&gt;

&lt;P&gt;i wonder if this used to work but was broken in 6.0? December 16 2011 would have been splunk 4.2 IIRC...maybe i'll downgrade and see if it works there...&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jan 2014 05:33:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Change-scripted-alert-script-location/m-p/31723#M325</guid>
      <dc:creator>ruman</dc:creator>
      <dc:date>2014-01-04T05:33:59Z</dc:date>
    </item>
  </channel>
</rss>

