<?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: Output of search as input to another index in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Output-of-search-as-input-to-another-index/m-p/70006#M17541</link>
    <description>&lt;P&gt;Thanks for the quick response.  I tried index=main &lt;SEARCH-QUERY&gt; | collect index=&lt;OTHER-INDEX-NAME&gt;&lt;/OTHER-INDEX-NAME&gt;&lt;/SEARCH-QUERY&gt;&lt;/P&gt;

&lt;P&gt;I noticed some informational messages indicating that some temporary file(s) had been created.&lt;/P&gt;

&lt;P&gt;However, if I do the following search&lt;BR /&gt;
index=&lt;OTHER-INDEX-NAME&gt;, I do not see any results.&lt;/OTHER-INDEX-NAME&gt;&lt;/P&gt;

&lt;P&gt;It is as if the collect failed to add the search output into the other index.&lt;/P&gt;

&lt;P&gt;I ensured that &lt;OTHER-INDEX-NAME&gt; was already created before running any of the above commands.  I used all default options when creating this index.&lt;/OTHER-INDEX-NAME&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2012 20:53:25 GMT</pubDate>
    <dc:creator>splunker_jim</dc:creator>
    <dc:date>2012-02-10T20:53:25Z</dc:date>
    <item>
      <title>Output of search as input to another index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Output-of-search-as-input-to-another-index/m-p/70004#M17539</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I have an computationally expensive query which is (manually) run on the main index. Instead of running it every time I would like to send the output of this search to another index where the output can be seen and further analysis can be done.&lt;/P&gt;

&lt;P&gt;Is it possible to take the output of a search on one index, and feed it as input to another index?  Can such a search be scheduled?&lt;/P&gt;

&lt;P&gt;Many thanks !&lt;/P&gt;

&lt;P&gt;jim&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2012 19:33:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Output-of-search-as-input-to-another-index/m-p/70004#M17539</guid>
      <dc:creator>splunker_jim</dc:creator>
      <dc:date>2012-02-10T19:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Output of search as input to another index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Output-of-search-as-input-to-another-index/m-p/70005#M17540</link>
      <description>&lt;P&gt;I think you can use the collect command to do just that.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2012 19:35:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Output-of-search-as-input-to-another-index/m-p/70005#M17540</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2012-02-10T19:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Output of search as input to another index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Output-of-search-as-input-to-another-index/m-p/70006#M17541</link>
      <description>&lt;P&gt;Thanks for the quick response.  I tried index=main &lt;SEARCH-QUERY&gt; | collect index=&lt;OTHER-INDEX-NAME&gt;&lt;/OTHER-INDEX-NAME&gt;&lt;/SEARCH-QUERY&gt;&lt;/P&gt;

&lt;P&gt;I noticed some informational messages indicating that some temporary file(s) had been created.&lt;/P&gt;

&lt;P&gt;However, if I do the following search&lt;BR /&gt;
index=&lt;OTHER-INDEX-NAME&gt;, I do not see any results.&lt;/OTHER-INDEX-NAME&gt;&lt;/P&gt;

&lt;P&gt;It is as if the collect failed to add the search output into the other index.&lt;/P&gt;

&lt;P&gt;I ensured that &lt;OTHER-INDEX-NAME&gt; was already created before running any of the above commands.  I used all default options when creating this index.&lt;/OTHER-INDEX-NAME&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2012 20:53:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Output-of-search-as-input-to-another-index/m-p/70006#M17541</guid>
      <dc:creator>splunker_jim</dc:creator>
      <dc:date>2012-02-10T20:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Output of search as input to another index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Output-of-search-as-input-to-another-index/m-p/70007#M17542</link>
      <description>&lt;P&gt;When you ran the first collect command did it complete?  When you run the new command, did you select all-time?  I just tried it without issue.  You can ignore the informational messages.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2012 21:00:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Output-of-search-as-input-to-another-index/m-p/70007#M17542</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2012-02-10T21:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Output of search as input to another index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Output-of-search-as-input-to-another-index/m-p/70008#M17543</link>
      <description>&lt;P&gt;Thanks for your quick response dmaislin !&lt;/P&gt;

&lt;P&gt;Here is what I did:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;index=main source=blah &lt;MY-SEARCH-QUERY&gt; | collect index=&lt;MY-OTHER-INDEX&gt;&lt;/MY-OTHER-INDEX&gt;&lt;/MY-SEARCH-QUERY&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I got the following messages in the message area (just below the search input area):&lt;/P&gt;

&lt;P&gt;7,813 matching events&lt;BR /&gt;
"Successfully wrote file to '1039324343_events.stash_new'."&lt;BR /&gt;
"Changing file extension to .stash_new for file=$random$_events.stash"&lt;/P&gt;

&lt;P&gt;Next, I did the following search&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;index=&lt;MY-OTHER-INDEX&gt;
In the search result pane, I see the following message:&lt;/MY-OTHER-INDEX&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;"No matching events found"&lt;/P&gt;

&lt;P&gt;In all of the above cases, the time range was set to 'All time'.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:23:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Output-of-search-as-input-to-another-index/m-p/70008#M17543</guid>
      <dc:creator>splunker_jim</dc:creator>
      <dc:date>2020-09-28T11:23:16Z</dc:date>
    </item>
  </channel>
</rss>

