<?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: Results for each minute in an hour (even if there's no data) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327224#M166149</link>
    <description>&lt;P&gt;Hey, &lt;/P&gt;

&lt;P&gt;can you please tell me what is info_min_time and info_max_time?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:43:25 GMT</pubDate>
    <dc:creator>patilsh</dc:creator>
    <dc:date>2020-09-29T15:43:25Z</dc:date>
    <item>
      <title>Results for each minute in an hour (even if there's no data)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327217#M166142</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;Suppose I want a search results for past 60minutes, how spunk works now is if there is any event in past 60mins then that is displayed.&lt;/P&gt;

&lt;P&gt;But what i want is Suppose time is 4pm and I give past 60mins, Splunk should start the data from 4:00, 4:01...... and so on till 5:00 irrespective of data is present or not, if data is not present then the result should give time with corresponding columns blank.&lt;/P&gt;

&lt;P&gt;Can someone please help mw on this.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 21:18:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327217#M166142</guid>
      <dc:creator>patilsh</dc:creator>
      <dc:date>2017-09-08T21:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Results for each minute in an hour (even if there's no data)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327218#M166143</link>
      <description>&lt;P&gt;Hey @patilsh, The comments on this post show each count by minute and then a second comment explains how to show the minutes without values&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/227568/how-to-edit-my-search-to-return-one-count-for-each.html"&gt;https://answers.splunk.com/answers/227568/how-to-edit-my-search-to-return-one-count-for-each.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 21:39:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327218#M166143</guid>
      <dc:creator>lfedak_splunk</dc:creator>
      <dc:date>2017-09-08T21:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Results for each minute in an hour (even if there's no data)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327219#M166144</link>
      <description>&lt;P&gt;If it's 4pm and you say 'past 60mins', Splunk will return data from 3pm-4pm. Not sure I understand what you are trying to do.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 22:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327219#M166144</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-09-08T22:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Results for each minute in an hour (even if there's no data)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327220#M166145</link>
      <description>&lt;P&gt;Just add this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart span=1m count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Sep 2017 22:06:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327220#M166145</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-09-08T22:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Results for each minute in an hour (even if there's no data)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327221#M166146</link>
      <description>&lt;P&gt;If I follow the desired outcome he would need to include &lt;STRONG&gt;usenull&lt;/STRONG&gt;&lt;BR /&gt;
so something like: &lt;BR /&gt;
    | timechart usenull=1 span=1m count&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 23:32:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327221#M166146</guid>
      <dc:creator>mtranchita</dc:creator>
      <dc:date>2017-09-09T23:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Results for each minute in an hour (even if there's no data)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327222#M166147</link>
      <description>&lt;P&gt;That depends on what you mean by "corresponding columns".&lt;/P&gt;

&lt;P&gt;If you have very sparse events, and are wanting to show the details for the events when they are present, but show blank lines with the _time if they are not, then you can do this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search
| fields field1 field2 field3 field4
| append 
    [|makeresults 
     | addinfo 
     | eval mystart=relative_time(info_min_time,"@m")
     | eval myend=relative_time(info_max_time,"@m+61s")
     | eval mytimes=mvrange(mystart,myend,60)
     | table mytimes
     | mvexpand mytimes
     | rename mytimes as _time
     ]
| table _time field1 field2 field3 field4
| fillnulls value=""
| stats max(*) as * by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Some of that is unnecessary if you are using a stats command already,though.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search
| fields foo bar
| bin _time span=1m
| stats count as mycount avg(foo) as avgfoo sum(bar) as sumbar by _time 
| append
    [|makeresults 
     | addinfo 
     | eval mystart=relative_time(info_min_time,"@m")
     | eval myend=relative_time(info_max_time,"@m+61s")
     | eval mytimes=mvrange(mystart,myend,60)
     | table mytimes
     | mvexpand mytimes
     | rename mytimes as _time
     | eval mycount = 0 
     ]
| stats sum(mycount) as count max(avgfoo) as avgfoo max(sumbar) as sumbar by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 Sep 2017 02:55:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327222#M166147</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-09-10T02:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Results for each minute in an hour (even if there's no data)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327223#M166148</link>
      <description>&lt;P&gt;time chart gives continuous value after the first entry is found:&lt;/P&gt;

&lt;P&gt;For example is say present time is 9pm and I want 60minutes ago data,  i.e data from 8pm&lt;/P&gt;

&lt;P&gt;But if the first entry is 8:10pm , timechart will give all the values from 8:10 till 9pm irrespective of data is present or not, but I also want blank entries from 8:00 to 8:10 pm as well&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 04:48:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327223#M166148</guid>
      <dc:creator>patilsh</dc:creator>
      <dc:date>2017-09-12T04:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Results for each minute in an hour (even if there's no data)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327224#M166149</link>
      <description>&lt;P&gt;Hey, &lt;/P&gt;

&lt;P&gt;can you please tell me what is info_min_time and info_max_time?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:43:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-for-each-minute-in-an-hour-even-if-there-s-no-data/m-p/327224#M166149</guid>
      <dc:creator>patilsh</dc:creator>
      <dc:date>2020-09-29T15:43:25Z</dc:date>
    </item>
  </channel>
</rss>

