<?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 do I search within results of a search that has already run? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-within-results-of-a-search-that-has-already-run/m-p/359524#M165301</link>
    <description>&lt;P&gt;Sometimes I write a brutal search that takes a very long time to run and then realize that I need to do something more to visualize it.  Is there a way to just refer to the results of my already run search as input to the extra commands?&lt;/P&gt;

&lt;P&gt;example&lt;BR /&gt;
My manager tells me that I need to know all firewall traffic to a group of servers over the last year.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=firewall dest_ip=192.168.100.0/24
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I run this but it takes 30 hours to run.  When I get the output, we see that a lot of the traffic is not interesting&lt;BR /&gt;
now I would like to search on my original results to filter out the uninteresting traffic, something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [get results from sid=1510343822.12851_69BC77DB-3AFA-433E-A86E-CFDBF93FB47D] 
| search NOT user in ["MonkeyA", "MonkeyB", "MonkeyC"] 
| stats count(bytes_in) by dest_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there a way to do this?&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2017 20:41:46 GMT</pubDate>
    <dc:creator>MonkeyK</dc:creator>
    <dc:date>2017-11-10T20:41:46Z</dc:date>
    <item>
      <title>How do I search within results of a search that has already run?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-within-results-of-a-search-that-has-already-run/m-p/359524#M165301</link>
      <description>&lt;P&gt;Sometimes I write a brutal search that takes a very long time to run and then realize that I need to do something more to visualize it.  Is there a way to just refer to the results of my already run search as input to the extra commands?&lt;/P&gt;

&lt;P&gt;example&lt;BR /&gt;
My manager tells me that I need to know all firewall traffic to a group of servers over the last year.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=firewall dest_ip=192.168.100.0/24
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I run this but it takes 30 hours to run.  When I get the output, we see that a lot of the traffic is not interesting&lt;BR /&gt;
now I would like to search on my original results to filter out the uninteresting traffic, something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [get results from sid=1510343822.12851_69BC77DB-3AFA-433E-A86E-CFDBF93FB47D] 
| search NOT user in ["MonkeyA", "MonkeyB", "MonkeyC"] 
| stats count(bytes_in) by dest_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there a way to do this?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 20:41:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-within-results-of-a-search-that-has-already-run/m-p/359524#M165301</guid>
      <dc:creator>MonkeyK</dc:creator>
      <dc:date>2017-11-10T20:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search within results of a search that has already run?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-within-results-of-a-search-that-has-already-run/m-p/359525#M165302</link>
      <description>&lt;P&gt;You can use &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Loadjob"&gt;loadjob&lt;/A&gt; to retrieve your search results, if they haven't been reaped yet.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 21:27:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-within-results-of-a-search-that-has-already-run/m-p/359525#M165302</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-11-10T21:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search within results of a search that has already run?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-within-results-of-a-search-that-has-already-run/m-p/359526#M165303</link>
      <description>&lt;P&gt;Perfect!  Thank you, this will save a lot of indexer and search head resources!&lt;/P&gt;

&lt;P&gt;A couple of notes on this that I learned:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;One can only loadjob for jobs that ran on the current searchhead.  So logon to the running searchhead first.&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;To stop worrying about the search being reaped, one can output to a lookup table: &lt;/P&gt;

&lt;P&gt;|loadjob 1510343822.12851_69BC77DB-3AFA-433E-A86E-CFDBF93FB47D | outputlookup myResults.csv&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;after that, just search the lookup&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup myResults.csv  
| search NOT user in ["MonkeyA", "MonkeyB", "MonkeyC"] 
| stats count(bytes_in) by dest_ip
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Nov 2017 21:55:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-within-results-of-a-search-that-has-already-run/m-p/359526#M165303</guid>
      <dc:creator>MonkeyK</dc:creator>
      <dc:date>2017-11-10T21:55:59Z</dc:date>
    </item>
  </channel>
</rss>

