<?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: Can REST API be used to execute a Bash script on Splunk server? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-Bash-script-on-Splunk-server/m-p/301722#M57013</link>
    <description>&lt;P&gt;Well, if you define the command on the deployment server you can simply run something like the following from the client:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -d search="| runscript" &lt;A href="https://deployment.server:8089/services/search/jobs" target="test_blank"&gt;https://deployment.server:8089/services/search/jobs&lt;/A&gt; -u admin:change
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 03 Apr 2018 16:05:23 GMT</pubDate>
    <dc:creator>damien_chillet</dc:creator>
    <dc:date>2018-04-03T16:05:23Z</dc:date>
    <item>
      <title>Can REST API be used to execute a Bash script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-Bash-script-on-Splunk-server/m-p/301719#M57010</link>
      <description>&lt;P&gt;I have a Bash script on my deployment server to add server into the serverclass.conf. Could I execute the bash script from a client using the Splunk REST API?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 15:10:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-Bash-script-on-Splunk-server/m-p/301719#M57010</guid>
      <dc:creator>jingqin</dc:creator>
      <dc:date>2018-04-03T15:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can REST API be used to execute a Bash script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-Bash-script-on-Splunk-server/m-p/301720#M57011</link>
      <description>&lt;P&gt;You could execute a bash script using the Splunk REST API.&lt;/P&gt;

&lt;P&gt;You would have to develop a custom search command "runscript" which would run the script and use the API to run a search ("| runscript").&lt;/P&gt;

&lt;P&gt;Link to Splunk Dev on how to create custom search commands: &lt;A href="http://dev.splunk.com/view/python-sdk/SP-CAAAEU2"&gt;http://dev.splunk.com/view/python-sdk/SP-CAAAEU2&lt;/A&gt;&lt;BR /&gt;
A good recent app example that use custom search command to run btool: &lt;A href="https://splunkbase.splunk.com/app/3923/"&gt;https://splunkbase.splunk.com/app/3923/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 15:51:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-Bash-script-on-Splunk-server/m-p/301720#M57011</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2018-04-03T15:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can REST API be used to execute a Bash script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-Bash-script-on-Splunk-server/m-p/301721#M57012</link>
      <description>&lt;P&gt;Emm.....but I would like to execute it from another server instead of search query. How can i achieve it?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 15:54:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-Bash-script-on-Splunk-server/m-p/301721#M57012</guid>
      <dc:creator>jingqin</dc:creator>
      <dc:date>2018-04-03T15:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can REST API be used to execute a Bash script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-Bash-script-on-Splunk-server/m-p/301722#M57013</link>
      <description>&lt;P&gt;Well, if you define the command on the deployment server you can simply run something like the following from the client:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -d search="| runscript" &lt;A href="https://deployment.server:8089/services/search/jobs" target="test_blank"&gt;https://deployment.server:8089/services/search/jobs&lt;/A&gt; -u admin:change
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Apr 2018 16:05:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-Bash-script-on-Splunk-server/m-p/301722#M57013</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2018-04-03T16:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can REST API be used to execute a Bash script on Splunk server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-Bash-script-on-Splunk-server/m-p/301723#M57014</link>
      <description>&lt;P&gt;is that work for &lt;STRONG&gt;bash&lt;/STRONG&gt; script? I only see python script in the document...&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 15:11:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-REST-API-be-used-to-execute-a-Bash-script-on-Splunk-server/m-p/301723#M57014</guid>
      <dc:creator>jingqin</dc:creator>
      <dc:date>2018-04-09T15:11:11Z</dc:date>
    </item>
  </channel>
</rss>

