<?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 edit my search to retrieve three 15 minute spans of data per day for a specified date range? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-retrieve-three-15-minute-spans-of-data/m-p/124253#M33585</link>
    <description>&lt;P&gt;thanks ., I have tried this out , both ways.. basically I had changed the structure a little here.. &lt;/P&gt;

&lt;P&gt;sourcetype=abc type=xyz clientid=123 | stats count as Calls by _time | fieldformat Calls = tostring(Calls, "commas") | eval date_hour=strftime(_time, "%H") | eval date_min=strftime(_time, "%M") | where date_hour=10 AND (date_min&amp;gt;=00 AND date_min&amp;lt;=15)&lt;/P&gt;

&lt;P&gt;This had certain matching events, but did not produce any results.  &lt;/P&gt;

&lt;P&gt;I run the query simply and get the numbers , but have to select the date and time range for each day. But this process is very hectic. &lt;/P&gt;

&lt;P&gt;sourcetype=abc type=xyz  clientid=123 | stats count as Calls --&amp;gt; produces the numbers &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 06:42:43 GMT</pubDate>
    <dc:creator>nmohammed</dc:creator>
    <dc:date>2020-09-29T06:42:43Z</dc:date>
    <item>
      <title>How to edit my search to retrieve three 15 minute spans of data per day for a specified date range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-retrieve-three-15-minute-spans-of-data/m-p/124251#M33583</link>
      <description>&lt;P&gt;I am trying to get data from splunk on the following basis :&lt;/P&gt;

&lt;P&gt;get data :&lt;/P&gt;

&lt;P&gt;• From June 19 to July 2&lt;BR /&gt;
• Every day:&lt;BR /&gt;
o   10:00 AM to 10:15 AM&lt;BR /&gt;
o   12:00 noon to 12:15 PM&lt;BR /&gt;
o   2:00 PM to 2:15 PM&lt;/P&gt;

&lt;P&gt;I have been using different searches with strftime, but getting 0 results. When I do a search on a per day basis, I am seeing numbers coming up. &lt;/P&gt;

&lt;P&gt;My search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=abc type=xyz clientid=123  | eval myHour=strftime(_time, "%H") | eval myMin=strftime(_time, "%M") | where ( myHour &amp;lt;= 10 AND myMin &amp;gt;=00) AND (myHour &amp;gt; 10 AND myMin &amp;lt;=15) | stats count as Calls by _time | fieldformat Calls = tostring(Calls, "commas") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can someone please help me figure out on how to get the required data ?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2015 18:32:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-retrieve-three-15-minute-spans-of-data/m-p/124251#M33583</guid>
      <dc:creator>nmohammed</dc:creator>
      <dc:date>2015-07-15T18:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to retrieve three 15 minute spans of data per day for a specified date range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-retrieve-three-15-minute-spans-of-data/m-p/124252#M33584</link>
      <description>&lt;P&gt;i think there's a problem with you where clause... try with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where myHour=10 AND (myMin &amp;gt;=00 AND myMin&amp;lt;=15)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if it still doesn't work check if your evals (myMin and myHour) are showing proper values.&lt;/P&gt;

&lt;P&gt;I  tested it using some splunk auto extracted date fields and i was getting the proper events&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | where date_hour=10 AND (date_minute&amp;gt;=00 AND date_minute&amp;lt;=15)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Jul 2015 19:40:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-retrieve-three-15-minute-spans-of-data/m-p/124252#M33584</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2015-07-15T19:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to retrieve three 15 minute spans of data per day for a specified date range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-retrieve-three-15-minute-spans-of-data/m-p/124253#M33585</link>
      <description>&lt;P&gt;thanks ., I have tried this out , both ways.. basically I had changed the structure a little here.. &lt;/P&gt;

&lt;P&gt;sourcetype=abc type=xyz clientid=123 | stats count as Calls by _time | fieldformat Calls = tostring(Calls, "commas") | eval date_hour=strftime(_time, "%H") | eval date_min=strftime(_time, "%M") | where date_hour=10 AND (date_min&amp;gt;=00 AND date_min&amp;lt;=15)&lt;/P&gt;

&lt;P&gt;This had certain matching events, but did not produce any results.  &lt;/P&gt;

&lt;P&gt;I run the query simply and get the numbers , but have to select the date and time range for each day. But this process is very hectic. &lt;/P&gt;

&lt;P&gt;sourcetype=abc type=xyz  clientid=123 | stats count as Calls --&amp;gt; produces the numbers &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:42:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-retrieve-three-15-minute-spans-of-data/m-p/124253#M33585</guid>
      <dc:creator>nmohammed</dc:creator>
      <dc:date>2020-09-29T06:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to retrieve three 15 minute spans of data per day for a specified date range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-retrieve-three-15-minute-spans-of-data/m-p/124254#M33586</link>
      <description>&lt;P&gt;This approach should work, run this from June 19th to July 2nd:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=abc type=xyz clientid=123 date_minute&amp;gt;=0 date_minute&amp;lt;15 (date_hour=10 OR date_hour=12 OR date_hour=14) | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Jul 2015 23:21:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-retrieve-three-15-minute-spans-of-data/m-p/124254#M33586</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-07-15T23:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to retrieve three 15 minute spans of data per day for a specified date range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-retrieve-three-15-minute-spans-of-data/m-p/124255#M33587</link>
      <description>&lt;P&gt;Awesome.. !!! It worked .. Thanks much Martin .&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 00:12:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-retrieve-three-15-minute-spans-of-data/m-p/124255#M33587</guid>
      <dc:creator>nmohammed</dc:creator>
      <dc:date>2015-07-16T00:12:06Z</dc:date>
    </item>
  </channel>
</rss>

