<?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 How to execute a shell script kept in app's bin folder using a dashboard? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-execute-a-shell-script-kept-in-app-s-bin-folder-using-a/m-p/147628#M185332</link>
    <description>&lt;P&gt;I have a requirement to execute a script (does file cleanup) to be executed from a dashboard button (so as to avoid login into unix box to execute it, it has to be executed on adhoc manner). The shell script is placed in etc/apps/MyApp/bin folder.&lt;/P&gt;

&lt;P&gt;I looked though similar question (&lt;A href="http://answers.splunk.com/answers/68392/trigger-shell-script-from-dashboard-button"&gt;http://answers.splunk.com/answers/68392/trigger-shell-script-from-dashboard-button&lt;/A&gt;) but couldn't figure out how to execute shell script from that.&lt;/P&gt;

&lt;P&gt;Has anyone done that and can share pointers/samples?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Apr 2014 16:15:30 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-04-30T16:15:30Z</dc:date>
    <item>
      <title>How to execute a shell script kept in app's bin folder using a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-execute-a-shell-script-kept-in-app-s-bin-folder-using-a/m-p/147628#M185332</link>
      <description>&lt;P&gt;I have a requirement to execute a script (does file cleanup) to be executed from a dashboard button (so as to avoid login into unix box to execute it, it has to be executed on adhoc manner). The shell script is placed in etc/apps/MyApp/bin folder.&lt;/P&gt;

&lt;P&gt;I looked though similar question (&lt;A href="http://answers.splunk.com/answers/68392/trigger-shell-script-from-dashboard-button"&gt;http://answers.splunk.com/answers/68392/trigger-shell-script-from-dashboard-button&lt;/A&gt;) but couldn't figure out how to execute shell script from that.&lt;/P&gt;

&lt;P&gt;Has anyone done that and can share pointers/samples?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 16:15:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-execute-a-shell-script-kept-in-app-s-bin-folder-using-a/m-p/147628#M185332</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-04-30T16:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute a shell script kept in app's bin folder using a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-execute-a-shell-script-kept-in-app-s-bin-folder-using-a/m-p/147629#M185333</link>
      <description>&lt;P&gt;You could define your cleanup script as a custom generating search command, and have the button trigger a search for &lt;CODE&gt;| cleanup&lt;/CODE&gt;, possibly while passing some parameters and output to be displayed in the dashboard.&lt;BR /&gt;
Another upside to this approach is you could easily have Splunk schedule a cleanup if needed... and even test whether cleanup is necessary first: &lt;CODE&gt;some search returning one result if cleanup is necessary, zero results if it is not | map search="cleanup"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 22:48:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-execute-a-shell-script-kept-in-app-s-bin-folder-using-a/m-p/147629#M185333</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-30T22:48:15Z</dc:date>
    </item>
  </channel>
</rss>

