<?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: How to use the output from one search as input for another search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202389#M58703</link>
    <description>&lt;P&gt;Hi mkatz,&lt;/P&gt;

&lt;P&gt;you can combine the searches and run it as one search by using the &lt;CODE&gt;filldown&lt;/CODE&gt; command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; host=hostname SSL=TLSv1.2 OR host=hostname2 RequestIP | filldown clientIP RequestIP | where clientIP=RequestIP | stats count by task 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is un-tested since I don't have your events available, but should get you started.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Wed, 28 Oct 2015 22:36:09 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2015-10-28T22:36:09Z</dc:date>
    <item>
      <title>How to use the output from one search as input for another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202387#M58701</link>
      <description>&lt;P&gt;I have a search that results in an IP address as the result with the field name &lt;STRONG&gt;clientIP&lt;/STRONG&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=hostname SSL=TLSv1.2 | stats count by clientIP
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I want to take the results and use as a search using the same values for &lt;STRONG&gt;clientIP&lt;/STRONG&gt;, renamed as &lt;STRONG&gt;RequestIP&lt;/STRONG&gt;, such that I'm using the IP addresses from the initial result and using that to count addresses:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=hostname2 RequestIP | stats count by task
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Oct 2015 20:18:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202387#M58701</guid>
      <dc:creator>mkatz</dc:creator>
      <dc:date>2015-10-28T20:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the output from one search as input for another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202388#M58702</link>
      <description>&lt;P&gt;You might want to try a subsearch to search based off the results of your previous search, there are some examples listed here&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchTutorial/Useasubsearch"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchTutorial/Useasubsearch&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 22:22:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202388#M58702</guid>
      <dc:creator>kserra_splunk</dc:creator>
      <dc:date>2015-10-28T22:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the output from one search as input for another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202389#M58703</link>
      <description>&lt;P&gt;Hi mkatz,&lt;/P&gt;

&lt;P&gt;you can combine the searches and run it as one search by using the &lt;CODE&gt;filldown&lt;/CODE&gt; command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; host=hostname SSL=TLSv1.2 OR host=hostname2 RequestIP | filldown clientIP RequestIP | where clientIP=RequestIP | stats count by task 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is un-tested since I don't have your events available, but should get you started.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 22:36:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202389#M58703</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-10-28T22:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the output from one search as input for another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202390#M58704</link>
      <description>&lt;P&gt;I don't think I explained it very well. I want to take the results of a search that gives me a list of IP addresses and use that list of IP addresses as part of the input for another search. In the first search the IP addresses is in the form of clientIP=IPAddress, but for the second search it needs to be RequestIP=IPAddress as the IPAddress has a different label in the second search.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 23:05:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202390#M58704</guid>
      <dc:creator>mkatz</dc:creator>
      <dc:date>2015-10-28T23:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the output from one search as input for another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202391#M58705</link>
      <description>&lt;P&gt;Can you provide one example each?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 23:50:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202391#M58705</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-10-28T23:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the output from one search as input for another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202392#M58706</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; host=hostname2 [search host=hostname SSL=TLSv1.2 | stats count by clientIP | table clientIP | rename clientIP as RequestIP ] | stats count by task
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Oct 2015 03:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202392#M58706</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-10-29T03:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the output from one search as input for another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202393#M58707</link>
      <description>&lt;P&gt;Just a side note on using &lt;CODE&gt;subsearches&lt;/CODE&gt;, they have a hard limit - see docs for more details &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.0/Search/Aboutsubsearches"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.0/Search/Aboutsubsearches&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2015 18:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-output-from-one-search-as-input-for-another/m-p/202393#M58707</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-10-30T18:48:31Z</dc:date>
    </item>
  </channel>
</rss>

