<?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 write one search find the count for three different time frames without using append or multisearch? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-one-search-find-the-count-for-three-different-time/m-p/167885#M47831</link>
    <description>&lt;P&gt;Can you explain why you have the condition banning &lt;CODE&gt;append&lt;/CODE&gt; (and presumably &lt;CODE&gt;appendcols&lt;/CODE&gt;) and subsearches?&lt;/P&gt;</description>
    <pubDate>Wed, 29 Apr 2015 07:21:59 GMT</pubDate>
    <dc:creator>rsennett_splunk</dc:creator>
    <dc:date>2015-04-29T07:21:59Z</dc:date>
    <item>
      <title>How to write one search find the count for three different time frames without using append or multisearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-one-search-find-the-count-for-three-different-time/m-p/167884#M47830</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;Please help me sort this out.&lt;BR /&gt;
I have a single search like &lt;CODE&gt;index=test sourcetype= test...| stats count&lt;/CODE&gt;, but the trick here is I have to find the count for &lt;CODE&gt;-30m@m&lt;/CODE&gt;, &lt;CODE&gt;-15m@m&lt;/CODE&gt; and &lt;CODE&gt;-5m@m&lt;/CODE&gt;....and the condition is we shouldn't use append or multisearch..it should run in a single query. &lt;/P&gt;

&lt;P&gt;the output would look something like below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;count(last30min)  count(last15min)  count(last5m)
      xxx               xxxx            xxxxx
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;NOTE: it should run in a single search, no append or multisearch &lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2015 06:27:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-one-search-find-the-count-for-three-different-time/m-p/167884#M47830</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2015-04-29T06:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to write one search find the count for three different time frames without using append or multisearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-one-search-find-the-count-for-three-different-time/m-p/167885#M47831</link>
      <description>&lt;P&gt;Can you explain why you have the condition banning &lt;CODE&gt;append&lt;/CODE&gt; (and presumably &lt;CODE&gt;appendcols&lt;/CODE&gt;) and subsearches?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2015 07:21:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-one-search-find-the-count-for-three-different-time/m-p/167885#M47831</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2015-04-29T07:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to write one search find the count for three different time frames without using append or multisearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-one-search-find-the-count-for-three-different-time/m-p/167886#M47832</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;You can create a field which identifies the time frame bucket. e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;..| eval currentTime=now() | eval timeBucket=if(_time &amp;gt; (currentTime-5mins), "5Mins", next conditions for 15 and 30 mins ) | stats count by timeBucket
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: convert mins in seconds for comparision.&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2015 08:46:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-one-search-find-the-count-for-three-different-time/m-p/167886#M47832</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-04-29T08:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to write one search find the count for three different time frames without using append or multisearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-one-search-find-the-count-for-three-different-time/m-p/167887#M47833</link>
      <description>&lt;P&gt;The condition was the env we are using can run only 10 concurrent searches and i have already 9 searches in place so thats why we ignored append &lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2015 17:24:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-one-search-find-the-count-for-three-different-time/m-p/167887#M47833</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2015-05-01T17:24:05Z</dc:date>
    </item>
  </channel>
</rss>

