<?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 get data by time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/get-data-by-time/m-p/532275#M150364</link>
    <description>&lt;P&gt;hi all, in my original search im getting data by folloing command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats range(_time) as timetaken by CorrelationID| stats count as Total, avg(timetaken) as AvgResponseTime, perc95(timetaken) as P95ResponseTime&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but now, i want this data on hourly basis. so i tried the following script:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; |bin _time span=1d |eval Time=strftime(_time , "%d/%m/%Y %H:%M")| stats range(_time) as timetaken by CorrelationID| stats count as Total, avg(timetaken) as AvgResponseTime, perc95(timetaken) as P95ResponseTime by Time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;but this gives me 0 value. i'm seeking for the right way to get data on hourly basis.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Dec 2020 03:19:18 GMT</pubDate>
    <dc:creator>Learner</dc:creator>
    <dc:date>2020-12-08T03:19:18Z</dc:date>
    <item>
      <title>get data by time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-data-by-time/m-p/532275#M150364</link>
      <description>&lt;P&gt;hi all, in my original search im getting data by folloing command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats range(_time) as timetaken by CorrelationID| stats count as Total, avg(timetaken) as AvgResponseTime, perc95(timetaken) as P95ResponseTime&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but now, i want this data on hourly basis. so i tried the following script:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; |bin _time span=1d |eval Time=strftime(_time , "%d/%m/%Y %H:%M")| stats range(_time) as timetaken by CorrelationID| stats count as Total, avg(timetaken) as AvgResponseTime, perc95(timetaken) as P95ResponseTime by Time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;but this gives me 0 value. i'm seeking for the right way to get data on hourly basis.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 03:19:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-data-by-time/m-p/532275#M150364</guid>
      <dc:creator>Learner</dc:creator>
      <dc:date>2020-12-08T03:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: get data by time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-data-by-time/m-p/532365#M150387</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;bin&lt;/FONT&gt; command rounds off _time values to the day so all events that happen on the same day will have the same timestamp (2020-12-08T00:00:00 today, for example).&amp;nbsp; The &lt;FONT face="courier new,courier"&gt;range(_time)&lt;/FONT&gt; function will return 0 on any given day.&lt;/P&gt;&lt;P&gt;To get hourly data, however, one should use &lt;FONT face="courier new,courier"&gt;span=1h&lt;/FONT&gt; rather than &lt;FONT face="courier new,courier"&gt;span=1d&lt;/FONT&gt; and use _time in the &lt;FONT face="courier new,courier"&gt;by&lt;/FONT&gt; clause of the final &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 17:58:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-data-by-time/m-p/532365#M150387</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-08T17:58:28Z</dc:date>
    </item>
  </channel>
</rss>

