<?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: What is an easy way to display the last 30 days _time in a table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392208#M114153</link>
    <description>&lt;P&gt;Limiting the fields to just _time and using stats instead of dedup should help:&lt;BR /&gt;
 &lt;CODE&gt;index=_internal earliest=-30d &lt;BR /&gt;
| fields _time &lt;BR /&gt;
| bucket _time span=1d &lt;BR /&gt;
| stats count by _time&lt;BR /&gt;
| fields - count&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 19:32:59 GMT</pubDate>
    <dc:creator>wildcats12</dc:creator>
    <dc:date>2020-09-29T19:32:59Z</dc:date>
    <item>
      <title>What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392207#M114152</link>
      <description>&lt;P&gt;I just wanna display last 30days _time in a table &lt;/P&gt;

&lt;P&gt;I am using &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Index=_internal earliest=-30d | bucket _time span=1d | Dedup _time | table _time 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it’s taking so much time &lt;/P&gt;

&lt;P&gt;Is there any other easy way?&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 03:36:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392207#M114152</guid>
      <dc:creator>akhil4mdev</dc:creator>
      <dc:date>2018-05-16T03:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392208#M114153</link>
      <description>&lt;P&gt;Limiting the fields to just _time and using stats instead of dedup should help:&lt;BR /&gt;
 &lt;CODE&gt;index=_internal earliest=-30d &lt;BR /&gt;
| fields _time &lt;BR /&gt;
| bucket _time span=1d &lt;BR /&gt;
| stats count by _time&lt;BR /&gt;
| fields - count&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:32:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392208#M114153</guid>
      <dc:creator>wildcats12</dc:creator>
      <dc:date>2020-09-29T19:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392209#M114154</link>
      <description>&lt;P&gt;If you just want to show daily _time in the table you are looking for &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Gentimes#2._Generate_daily_time_ranges_by_specifying_relative_times"&gt;gentimes&lt;/A&gt; command. It is a generating command which starts with a pipe. Please try out and confirm!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-30 increment=1d
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 May 2018 05:17:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392209#M114154</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-16T05:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392210#M114155</link>
      <description>&lt;P&gt;It worked thank you !&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 05:50:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392210#M114155</guid>
      <dc:creator>akhil4mdev</dc:creator>
      <dc:date>2018-05-16T05:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392211#M114156</link>
      <description>&lt;P&gt;But getimes snaps to a day &lt;BR /&gt;
It doesn’t show today &lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 07:40:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392211#M114156</guid>
      <dc:creator>akhil4mdev</dc:creator>
      <dc:date>2018-05-16T07:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392212#M114157</link>
      <description>&lt;P&gt;Add &lt;CODE&gt;end&lt;/CODE&gt; as &lt;CODE&gt;+1&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-30 end=+1 increment=1d
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 May 2018 08:11:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392212#M114157</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-16T08:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392213#M114158</link>
      <description>&lt;P&gt;What I mean is &lt;/P&gt;

&lt;P&gt;If I run the query today 3pm &lt;BR /&gt;
It shd go back to 30days at 3pm &lt;/P&gt;

&lt;P&gt;Could u please say these ?&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 08:15:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392213#M114158</guid>
      <dc:creator>akhil4mdev</dc:creator>
      <dc:date>2018-05-16T08:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392214#M114159</link>
      <description>&lt;P&gt;Try the following search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-30 end=+1 increment=1h 
| rename starttime as _time
| timechart count span=1h
| eval _time=strftime(_time,"%Y/%m/%d %H").":00:00"
| eval _time=strptime(_time,"%Y/%m/%d %H:%M:%S")
| eval currentHour=strftime(now(),"%H") 
| eval hourFilter=strftime(_time,"%H")
| where currentHour=hourFilter
| table _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 May 2018 08:36:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392214#M114159</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-16T08:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392215#M114160</link>
      <description>&lt;P&gt;Thank you very much &lt;BR /&gt;
I got what I need &lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 09:49:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392215#M114160</guid>
      <dc:creator>akhil4mdev</dc:creator>
      <dc:date>2018-05-16T09:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392216#M114161</link>
      <description>&lt;P&gt;But still can’t we snap to exact time ? &lt;BR /&gt;
Like if I run &lt;BR /&gt;
At 3:33 it shd snap to 30 days back at 3:33 &lt;/P&gt;

&lt;P&gt;I tried &lt;BR /&gt;
Increment=1m but it’s not working &lt;/P&gt;

&lt;P&gt;Thank you very much &lt;BR /&gt;
I got what I need but still I wanna learn more about gentimes&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 09:57:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392216#M114161</guid>
      <dc:creator>akhil4mdev</dc:creator>
      <dc:date>2018-05-16T09:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392217#M114162</link>
      <description>&lt;P&gt;@akhil4mdev, based on your last request I had used the following to snap to current hour. For minute you would need to make corresponding changes i.e. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-30 end=+1 increment=1m
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you need Minute as well you would need to add &lt;CODE&gt;%M&lt;/CODE&gt; and remove a &lt;CODE&gt;.00&lt;/CODE&gt; from string time conversion i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart span=1m count
| eval _time=strftime(_time,"%Y/%m/%d %H:%M").":00"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In Order to return only time ranges for current Hour and Minute for each day final change would be &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval currentHour=strftime(now(),"%H:%M") 
| eval hourFilter=strftime(_time,"%H:%M")
| where currentHour=hourFilter
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Final query looks like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-30 end=+1 increment=1m
| rename starttime as _time
| timechart span=1m count
| eval _time=strftime(_time,"%Y/%m/%d %H:%M").":00"
| eval _time=strptime(_time,"%Y/%m/%d %H:%M:%S")
| eval currentHour=strftime(now(),"%H:%M") 
| eval hourFilter=strftime(_time,"%H:%M")
| where currentHour=hourFilter
| table _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please try out and confirm. Do up vote the comments that have helped!&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 11:19:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392217#M114162</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-16T11:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392218#M114163</link>
      <description>&lt;P&gt;How to up the vote ? And can I follow you in Linkdin please?&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 22:05:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392218#M114163</guid>
      <dc:creator>akhil4mdev</dc:creator>
      <dc:date>2018-05-17T22:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: What is an easy way to display the last 30 days _time in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392219#M114164</link>
      <description>&lt;P&gt;When you hover over specific comment, you would notice Up Arrow pop-up next to the name which can be clicked to Up Vote.&lt;/P&gt;

&lt;P&gt;Splunk Answers also allows you to follow your favorite Splunkter &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; Also another great place to socialize and get immediate response over chat is to join &lt;A href="https://docs.splunk.com/Documentation/Community/latest/community/Chat#Join_us_on_Slack"&gt;Splunk related channels on Slack Chat&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Finally, sure... if it helps!&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 07:02:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-an-easy-way-to-display-the-last-30-days-time-in-a-table/m-p/392219#M114164</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-18T07:02:19Z</dc:date>
    </item>
  </channel>
</rss>

