<?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 Passing results from subsearch to a field in parent search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232229#M68870</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;

&lt;P&gt;I'm interested in passing a result or results (a list of users from proxy logs) from a subsearch into a field in my parent search (against AV logs). I tried using eval, but was unsuccessful. Is it possible to pass results from a subsearch into a variable?  Any help would be appreciated!&lt;/P&gt;

&lt;P&gt;Something like this doesn't work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=MyData sourcetype=AV_logs user=[index=MyData sourcetype=Proxy_logs src_ip="X.X.X.X" dst_port="80" domain="*pleasehelpme.splunk"| table user] | table user, event, etc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 05 May 2016 15:31:30 GMT</pubDate>
    <dc:creator>Splunkquish</dc:creator>
    <dc:date>2016-05-05T15:31:30Z</dc:date>
    <item>
      <title>Passing results from subsearch to a field in parent search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232229#M68870</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;

&lt;P&gt;I'm interested in passing a result or results (a list of users from proxy logs) from a subsearch into a field in my parent search (against AV logs). I tried using eval, but was unsuccessful. Is it possible to pass results from a subsearch into a variable?  Any help would be appreciated!&lt;/P&gt;

&lt;P&gt;Something like this doesn't work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=MyData sourcetype=AV_logs user=[index=MyData sourcetype=Proxy_logs src_ip="X.X.X.X" dst_port="80" domain="*pleasehelpme.splunk"| table user] | table user, event, etc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 May 2016 15:31:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232229#M68870</guid>
      <dc:creator>Splunkquish</dc:creator>
      <dc:date>2016-05-05T15:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Passing results from subsearch to a field in parent search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232230#M68871</link>
      <description>&lt;P&gt;Remove &lt;CODE&gt;user=&lt;/CODE&gt; in your main search. Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=MyData sourcetype=AV_logs [index=MyData sourcetype=Proxy_logs src_ip="X.X.X.X" dst_port="80" domain="*pleasehelpme.splunk"| table user] | table user, event, etc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 May 2016 15:55:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232230#M68871</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-05-05T15:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Passing results from subsearch to a field in parent search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232231#M68872</link>
      <description>&lt;P&gt;I'm still not having any luck with my query. When I run my subsearch separately, it successfully produces a table of values, but when it's with a parents search, I get "no results found." Is there a way to pass values from a subsearch directly to a field in my parent search?&lt;/P&gt;

&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 18:36:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232231#M68872</guid>
      <dc:creator>Splunkquish</dc:creator>
      <dc:date>2016-05-05T18:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Passing results from subsearch to a field in parent search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232232#M68873</link>
      <description>&lt;P&gt;Do you get valid results when you run the main search and the sub search separately? Are there any matching?&lt;/P&gt;

&lt;P&gt;The option would be to try grouping.. like this&lt;BR /&gt;
    (index=MyData sourcetype=AV_logs) OR (index=MyData sourcetype=Proxy_logs src_ip="X.X.X.X" dst_port="80" domain="*pleasehelpme.splunk") | stats values(event) as event values(sourcetype) as st by user | where mvcount(st)=2&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:36:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232232#M68873</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2020-09-29T09:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Passing results from subsearch to a field in parent search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232233#M68874</link>
      <description>&lt;P&gt;There are matching results for the fields I'm interested in in both the main and sub searches.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 19:05:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232233#M68874</guid>
      <dc:creator>Splunkquish</dc:creator>
      <dc:date>2016-05-05T19:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Passing results from subsearch to a field in parent search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232234#M68875</link>
      <description>&lt;P&gt;Check fieldnames in both, they are case sensitive. Did you try the second option? Also, there are limitation to subsearch, how many events do both searches return? &lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 19:22:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232234#M68875</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-05-05T19:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Passing results from subsearch to a field in parent search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232235#M68876</link>
      <description>&lt;P&gt;I'm actually testing this with two sets of web traffic logs since most of the data is similar. Both return 3000+ results (source IP) using dedup for a 15 minute period.&lt;/P&gt;

&lt;P&gt;I haven't tried the other option you suggested. I'm not sure what the "values(event)," "st by user," or "mvcount(st)" means as I've never used them. Is there something I can reference for more information?&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 19:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232235#M68876</guid>
      <dc:creator>Splunkquish</dc:creator>
      <dc:date>2016-05-05T19:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Passing results from subsearch to a field in parent search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232236#M68877</link>
      <description>&lt;P&gt;subsearches should start with &lt;CODE&gt;[ search&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 09:00:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232236#M68877</guid>
      <dc:creator>sinash</dc:creator>
      <dc:date>2017-02-21T09:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Passing results from subsearch to a field in parent search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232237#M68878</link>
      <description>&lt;P&gt;Line @sinash said. This would be the updated query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=MyData sourcetype=AV_logs [search index=MyData sourcetype=Proxy_logs src_ip="X.X.X.X" dst_port="80" domain="*pleasehelpme.splunk"| table user] | table user, event, etc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Feb 2017 09:17:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-results-from-subsearch-to-a-field-in-parent-search/m-p/232237#M68878</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-02-21T09:17:40Z</dc:date>
    </item>
  </channel>
</rss>

