<?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 values from one search to another search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-one-search-to-another-search/m-p/448396#M127039</link>
    <description>&lt;P&gt;Hi @batuhankutluca&lt;BR /&gt;
You don't need to upload a CSV, you can create one on-the-fly like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=xxx | table src_ip dvc|outputlookup ip_to_dvc.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you can do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=yyy |lookup ip_to_dvc.csv src_ip as srcip OUTPUT dvc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 18 Mar 2019 14:06:58 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2019-03-18T14:06:58Z</dc:date>
    <item>
      <title>How to use values from one search to another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-one-search-to-another-search/m-p/448395#M127038</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I have a certain search that returns me many fields with values. Next thing I wanna do is get values of "src_ip" field and use them on an other search. I assume I can do that with a subsearch but I it is a bit cost. Other solution I thought was upload the first search's output  as csv and get values form lookup but I'm not allowed to upload lookups. Can someone help me about that? Thanks.&lt;BR /&gt;
(TLDR - Don't wanna use subsearch, need a solution.)&lt;/P&gt;

&lt;P&gt;Ex Search: &lt;CODE&gt;sourcetype=xxx | table src_ip -&amp;gt; sourcetype=yyy srcip=$src_ip$&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 13:53:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-one-search-to-another-search/m-p/448395#M127038</guid>
      <dc:creator>batuhankutluca</dc:creator>
      <dc:date>2019-03-18T13:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use values from one search to another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-one-search-to-another-search/m-p/448396#M127039</link>
      <description>&lt;P&gt;Hi @batuhankutluca&lt;BR /&gt;
You don't need to upload a CSV, you can create one on-the-fly like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=xxx | table src_ip dvc|outputlookup ip_to_dvc.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you can do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=yyy |lookup ip_to_dvc.csv src_ip as srcip OUTPUT dvc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Mar 2019 14:06:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-one-search-to-another-search/m-p/448396#M127039</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-18T14:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use values from one search to another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-one-search-to-another-search/m-p/448397#M127040</link>
      <description>&lt;P&gt;So this doesn't work like subsearch right ? It saves the output of the first search to somewhere and get values for the second search from there ? &lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 14:09:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-one-search-to-another-search/m-p/448397#M127040</guid>
      <dc:creator>batuhankutluca</dc:creator>
      <dc:date>2019-03-18T14:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use values from one search to another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-one-search-to-another-search/m-p/448398#M127041</link>
      <description>&lt;P&gt;Correct, you can run this as two different searches.&lt;BR /&gt;
This is commonly done to generate a lookup file once a day/hour etc, so you can then use it it subsequent searches.&lt;/P&gt;

&lt;P&gt;If you wanted to run all the elements at once, there are a number of ways - subsearch as you have mentioned (but ruled out) a 'join' (also performance sucking), or couple of options with a event/stream stats commands, or even with an append. &lt;/P&gt;

&lt;P&gt;Personally, I like the separate lookup option, but it all depends on your uses case.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 14:15:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-one-search-to-another-search/m-p/448398#M127041</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-18T14:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to use values from one search to another search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-one-search-to-another-search/m-p/448399#M127042</link>
      <description>&lt;P&gt;Oh It fits for my problem then. Yeah as You mentioned that join and subsearch consume much resource. This method is just I wanted. Thanks sir!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 14:24:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-one-search-to-another-search/m-p/448399#M127042</guid>
      <dc:creator>batuhankutluca</dc:creator>
      <dc:date>2019-03-18T14:24:10Z</dc:date>
    </item>
  </channel>
</rss>

