<?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: Splunk sub search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-sub-search/m-p/176018#M50541</link>
    <description>&lt;P&gt;filter works ! Awesome ! thanks for your help.&lt;/P&gt;</description>
    <pubDate>Fri, 23 May 2014 03:20:47 GMT</pubDate>
    <dc:creator>Sriram</dc:creator>
    <dc:date>2014-05-23T03:20:47Z</dc:date>
    <item>
      <title>Splunk sub search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-sub-search/m-p/176015#M50538</link>
      <description>&lt;P&gt;I have a splunk query to combine 2 different results. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=applogs sourcetype=appsource "performance metrics"  | search "AvgRespTime" &amp;gt; 6| eval "Statistics"  = requestCount + " requests processed. Average Response Time = " + AvgRespTime + " seconds." | append [search index=applogs sourcetype=appsource "component metrics"  | eval "Statistics"  = componentcount + " components processed. Average Response Time = " + AvgRespTime + " seconds." ] | table "Statistics" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want the sub search results to be displayed only if "AvgRespTime" &amp;gt; 6, right now the inner sub query gets generated with results no matter what the "AvgRespTime" value is and getting printed. Any ideas ? &lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2014 17:40:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-sub-search/m-p/176015#M50538</guid>
      <dc:creator>Sriram</dc:creator>
      <dc:date>2014-05-22T17:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk sub search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-sub-search/m-p/176016#M50539</link>
      <description>&lt;P&gt;Your subsearch doesn't have the &lt;STRONG&gt;AvgRespTime&amp;gt;6&lt;/STRONG&gt; condition in it, so the subsearch will return events of all AvgRespTimes.  Add that condition into your subsearch and it should work.&lt;/P&gt;

&lt;P&gt;I'm thinking you might be able to refactor your search as well so that it doesn't need a subsearch at all.  Would this work for you?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=applogs sourcetype=appsource  "AvgRespTime" &amp;gt; 6 "performance metrics" OR "component metrics"     
| eval Statistics=if(searchmatch("performance metrics"), requestCount + " requests processed. Average Response Time = " + AvgRespTime + " seconds.", componentcount + " components processed. Average Response Time = " + AvgRespTime + " seconds.")
| table Statistics
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 May 2014 18:18:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-sub-search/m-p/176016#M50539</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2014-05-22T18:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk sub search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-sub-search/m-p/176017#M50540</link>
      <description>&lt;P&gt;How about something like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=applogs sourcetype=appsource "performance metrics"  | search "AvgRespTime" &amp;gt; 6| eval "Statistics"  = requestCount + " requests processed. Average Response Time = " + AvgRespTime + " seconds." | eval filter=1 | append [search index=applogs sourcetype=appsource "component metrics"  | eval "Statistics"  = componentcount + " components processed. Average Response Time = " + AvgRespTime + " seconds." | eval filter=-1 ] | eventstats max(filter) as filter | where filter =1 | table "Statistics"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 May 2014 18:28:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-sub-search/m-p/176017#M50540</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-05-22T18:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk sub search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-sub-search/m-p/176018#M50541</link>
      <description>&lt;P&gt;filter works ! Awesome ! thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 03:20:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-sub-search/m-p/176018#M50541</guid>
      <dc:creator>Sriram</dc:creator>
      <dc:date>2014-05-23T03:20:47Z</dc:date>
    </item>
  </channel>
</rss>

