<?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 Executing search query on a remote Splunk Instance, may be using REST command or Command line in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Executing-search-query-on-a-remote-Splunk-Instance-may-be-using/m-p/124822#M25721</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have a requirement to execute a query on different SPlunk instances (different environmet). Adding them as search peer is not an options (limitation), hence I was wondering if we have any options, either REST command or using command line, to execute a search on a remote Splunk instance and get the search result.&lt;/P&gt;

&lt;P&gt;If it can be done by REST, I may be able to automate the same.&lt;/P&gt;

&lt;P&gt;Thanks in advanced.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2013 20:12:01 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2013-10-31T20:12:01Z</dc:date>
    <item>
      <title>Executing search query on a remote Splunk Instance, may be using REST command or Command line</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Executing-search-query-on-a-remote-Splunk-Instance-may-be-using/m-p/124822#M25721</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have a requirement to execute a query on different SPlunk instances (different environmet). Adding them as search peer is not an options (limitation), hence I was wondering if we have any options, either REST command or using command line, to execute a search on a remote Splunk instance and get the search result.&lt;/P&gt;

&lt;P&gt;If it can be done by REST, I may be able to automate the same.&lt;/P&gt;

&lt;P&gt;Thanks in advanced.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 20:12:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Executing-search-query-on-a-remote-Splunk-Instance-may-be-using/m-p/124822#M25721</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-10-31T20:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Executing search query on a remote Splunk Instance, may be using REST command or Command line</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Executing-search-query-on-a-remote-Splunk-Instance-may-be-using/m-p/124823#M25722</link>
      <description>&lt;P&gt;What exactly is the limitation that makes you unable to add the remote instances as search peers? The search head will be communicating with its search peers solely through the REST API, so...&lt;/P&gt;

&lt;P&gt;Otherwise you could either query the remote instance simply by issuing a search through the splunk CLI, by adding the &lt;CODE&gt;uri&lt;/CODE&gt; parameter:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/bin/splunk search 'yoursearch' -uri 'https://remoteinstance:8089/'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or you could use one of the existing SDK's to issue searches via the REST API.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 20:22:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Executing-search-query-on-a-remote-Splunk-Instance-may-be-using/m-p/124823#M25722</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-10-31T20:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Executing search query on a remote Splunk Instance, may be using REST command or Command line</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Executing-search-query-on-a-remote-Splunk-Instance-may-be-using/m-p/124824#M25723</link>
      <description>&lt;P&gt;This can certainly be accomplished via the &lt;A href="http://dev.splunk.com/view/rest-api-overview/SP-CAAADP8"&gt;Splunk REST API&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;And we have &lt;A href="http://dev.splunk.com/view/sdks/SP-CAAADP7"&gt;several language SDKs&lt;/A&gt; with comprehensive searching examples to make it easier to do this.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 20:23:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Executing-search-query-on-a-remote-Splunk-Instance-may-be-using/m-p/124824#M25723</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2013-10-31T20:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Executing search query on a remote Splunk Instance, may be using REST command or Command line</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Executing-search-query-on-a-remote-Splunk-Instance-may-be-using/m-p/124825#M25724</link>
      <description>&lt;P&gt;how do i export the above results to a text or csv?&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 22:47:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Executing-search-query-on-a-remote-Splunk-Instance-may-be-using/m-p/124825#M25724</guid>
      <dc:creator>shivarpith</dc:creator>
      <dc:date>2016-05-26T22:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Executing search query on a remote Splunk Instance, may be using REST command or Command line</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Executing-search-query-on-a-remote-Splunk-Instance-may-be-using/m-p/124826#M25725</link>
      <description>&lt;P&gt;I made a search command to do it easily.&lt;/P&gt;

&lt;P&gt;Probably too late for this issue, but maybe someone will find it helpful and simpler than using the REST API directly:&lt;BR /&gt;
&lt;A href="https://github.com/omerl13/remote-splunk-search"&gt;https://github.com/omerl13/remote-splunk-search&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Usage will be like: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| remote 
    host="mysplunk2.com" 
    query="index=main | head 50 | table _time host _raw" 
    username="user" 
    password="changeme"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(Tokens are also supported)&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 17:31:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Executing-search-query-on-a-remote-Splunk-Instance-may-be-using/m-p/124826#M25725</guid>
      <dc:creator>omerl</dc:creator>
      <dc:date>2019-10-01T17:31:55Z</dc:date>
    </item>
  </channel>
</rss>

