<?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: Subsearch not Working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-not-Working/m-p/277851#M83824</link>
    <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="linux:audit" [ search index=main sourcetype="linux:audit" key=CFG_Oracle | stats count by msg | table msg]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 21 Jul 2016 21:10:28 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-07-21T21:10:28Z</dc:date>
    <item>
      <title>Subsearch not Working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-not-Working/m-p/277850#M83823</link>
      <description>&lt;P&gt;I believe I fully understand the concept of subsearches and have used it a few times perfectly, however, I can't get it to work in this instance.&lt;/P&gt;

&lt;P&gt;Below is my search string;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="linux:audit" [ search index=main sourcetype="linux:audit" key=CFG_Oracle | return msg ] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The idea here is to search index=main and sourcetype=linux:audit, for any event with key=CFG_oracle, then for those events return the values of the msg field after which the msg values should be searched in index=main and sourcetype=linux:audit and return those events.&lt;/P&gt;

&lt;P&gt;However when I run this search, I get all events with keys other than CFG_Oracle, however when I tun the sub-search on it's own I get the desired result, I am not sure why this isn't working properly as a sub-search.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 21:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-not-Working/m-p/277850#M83823</guid>
      <dc:creator>Makinde</dc:creator>
      <dc:date>2016-07-21T21:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch not Working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-not-Working/m-p/277851#M83824</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="linux:audit" [ search index=main sourcetype="linux:audit" key=CFG_Oracle | stats count by msg | table msg]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jul 2016 21:10:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-not-Working/m-p/277851#M83824</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-21T21:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch not Working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-not-Working/m-p/277852#M83825</link>
      <description>&lt;P&gt;Thanks Somesoni2&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 21:15:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-not-Working/m-p/277852#M83825</guid>
      <dc:creator>Makinde</dc:creator>
      <dc:date>2016-07-21T21:15:58Z</dc:date>
    </item>
  </channel>
</rss>

