<?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: Passing Value from Subsearch to Parent Search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Passing-Value-from-Subsearch-to-Parent-Search/m-p/509376#M142354</link>
    <description>&lt;P&gt;The trick to subsearches is to make sure they return a string that makes sense when it is incorporated into the main search.&lt;/P&gt;&lt;P&gt;Try running the subsearch like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=emailThreat | dedup threatUrl | fields threatUrl | format&lt;/LI-CODE&gt;&lt;P&gt;That will generate the text that the main search will see.&amp;nbsp; Make sure it looks OK and that the firewall index contains a &lt;FONT face="courier new,courier"&gt;threatUrl&lt;/FONT&gt; field.&amp;nbsp; If the field has a different name, add a &lt;FONT face="courier new,courier"&gt;rename&lt;/FONT&gt; command before &lt;FONT face="courier new,courier"&gt;format&lt;/FONT&gt; in the subsearch.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jul 2020 19:21:47 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-07-15T19:21:47Z</dc:date>
    <item>
      <title>Passing Value from Subsearch to Parent Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-Value-from-Subsearch-to-Parent-Search/m-p/509370#M142349</link>
      <description>&lt;P&gt;I am fairly new to Splunk and only have the basics under my belt at best. I'm having trouble proving out the following use case:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Taking a malicious URL (threatURL) from email threat (index=emailThreat) events and then querying the firewall (index=firewall) for any user activity including the referenced malicious URL. So far I have the following search:&lt;/P&gt;&lt;P&gt;index=firewall log_subtype=url [search index=emailThreat | dedup threatUrl | table threatUrl] | table time, url, user&lt;/P&gt;&lt;P&gt;Separately, the the two searches work and return the expected value. However, when put together, the search returns no results. Not sure what I'm missing.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 18:33:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-Value-from-Subsearch-to-Parent-Search/m-p/509370#M142349</guid>
      <dc:creator>jstocker</dc:creator>
      <dc:date>2020-07-15T18:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Value from Subsearch to Parent Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-Value-from-Subsearch-to-Parent-Search/m-p/509376#M142354</link>
      <description>&lt;P&gt;The trick to subsearches is to make sure they return a string that makes sense when it is incorporated into the main search.&lt;/P&gt;&lt;P&gt;Try running the subsearch like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=emailThreat | dedup threatUrl | fields threatUrl | format&lt;/LI-CODE&gt;&lt;P&gt;That will generate the text that the main search will see.&amp;nbsp; Make sure it looks OK and that the firewall index contains a &lt;FONT face="courier new,courier"&gt;threatUrl&lt;/FONT&gt; field.&amp;nbsp; If the field has a different name, add a &lt;FONT face="courier new,courier"&gt;rename&lt;/FONT&gt; command before &lt;FONT face="courier new,courier"&gt;format&lt;/FONT&gt; in the subsearch.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 19:21:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-Value-from-Subsearch-to-Parent-Search/m-p/509376#M142354</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-15T19:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Value from Subsearch to Parent Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-Value-from-Subsearch-to-Parent-Search/m-p/509377#M142355</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;can you give sample events from indexes?&lt;/P&gt;&lt;P&gt;Anyhow you could try something like&lt;/P&gt;&lt;LI-CODE lang="java"&gt;(index=firewall_los log_subtype=url url=*) OR (index=emailThreath threathUrl=* user=*)
| eval commonUrl=coalesce(url, threathUrl)
| stats first(_time) as _time values(user) as user by commonUrl
| table _time, commonUrl, user&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 15 Jul 2020 19:23:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-Value-from-Subsearch-to-Parent-Search/m-p/509377#M142355</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-07-15T19:23:18Z</dc:date>
    </item>
  </channel>
</rss>

