<?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 do I keep the value of the minutes in a span=1h timechart if I want to keep only the max value of the hour. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709848#M239878</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thank you, this is a start. Indeed, I find the time but I only have 1 value displayed. I would like to be able to keep the top 5 peaks per day of the last x days.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2025 16:24:47 GMT</pubDate>
    <dc:creator>Splunked_Kid</dc:creator>
    <dc:date>2025-01-27T16:24:47Z</dc:date>
    <item>
      <title>How do I keep the value of the minutes in a span=1h timechart if I want to keep only the max value of the hour.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709845#M239876</link>
      <description>&lt;P&gt;Hello, I'm trying to add up the MIPS of each of the partitions per minute and then keep only the maximum MIPS per day but I'd like to display the time and minutes at which this peak arrived. How do I do it?&lt;/P&gt;&lt;P&gt;Here's my search:&lt;/P&gt;&lt;P&gt;First, I want to make the addition of the MIPS for all partition&amp;nbsp;per minute.&lt;BR /&gt;Second, I want to keep only the max value per day of the prior addition.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;index=myindex&amp;nbsp;&lt;BR /&gt;| bin span=1m _time&lt;BR /&gt;| stats sum(MIPS) as MIPSParMinute by _time&lt;BR /&gt;| timechart span=1d max(MIPSParMinute) as MaxMIPSParMinute&lt;/P&gt;&lt;P&gt;| eval Day=strftime(_time,"%Y/%m/%d")&lt;BR /&gt;| eval Hour=strftime(_time,"%H:%M")&lt;BR /&gt;| sort 0 - MaxMIPSParMinute Day&lt;BR /&gt;| dedup Day&lt;BR /&gt;| table Day Hour MaxMIPSParMinute&lt;BR /&gt;&lt;BR /&gt;Unfortunaly, in my result I loose the hour and minute of when this peak occurs in the day.&amp;nbsp; Is there a way of keeping the hours and minute value?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Splunked_Kid_0-1737993443192.png" style="width: 767px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/34251i4246C51BC4FF6D0F/image-dimensions/767x104?v=v2" width="767" height="104" role="button" title="Splunked_Kid_0-1737993443192.png" alt="Splunked_Kid_0-1737993443192.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 15:58:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709845#M239876</guid>
      <dc:creator>Splunked_Kid</dc:creator>
      <dc:date>2025-01-27T15:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I keep the value of the minutes in a span=1h timechart if I want to keep only the max value of the hour.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709846#M239877</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273476"&gt;@Splunked_Kid&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you could try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex 
| bin span=1m _time
| stats sum(MIPS) as MIPSParMinute by _time
| eventstats max(MIPS) AS max_MIPS
| where MIPSParMinute=max_MIPS
| eval Day=strftime(_time,"%Y/%m/%d")
| eval Hour=strftime(_time,"%H:%M")
| table Day Hour MaxMIPSParMinute&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 16:16:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709846#M239877</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-01-27T16:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I keep the value of the minutes in a span=1h timechart if I want to keep only the max value of the hour.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709848#M239878</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thank you, this is a start. Indeed, I find the time but I only have 1 value displayed. I would like to be able to keep the top 5 peaks per day of the last x days.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 16:24:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709848#M239878</guid>
      <dc:creator>Splunked_Kid</dc:creator>
      <dc:date>2025-01-27T16:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I keep the value of the minutes in a span=1h timechart if I want to keep only the max value of the hour.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709919#M239902</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;I would like to be able to keep the top 5 peaks per day of the last x days.&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Be careful. &amp;nbsp;I suspect that you really mean to keep the top 5 peak-per-day of the last x days (based on your use of dedup Day). Something like&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;_time&lt;/TD&gt;&lt;TD&gt;MaxMIPSParMinute&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2025-01-15 00:27:00&lt;/TD&gt;&lt;TD&gt;2583&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2025-01-07 23:08:00&lt;/TD&gt;&lt;TD&gt;2129&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2025-01-25 22:15:00&lt;/TD&gt;&lt;TD&gt;2069&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2025-01-22 13:58:00&lt;/TD&gt;&lt;TD&gt;1222&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2025-01-18 08:35:00&lt;/TD&gt;&lt;TD&gt;990&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Is this correct? &amp;nbsp;The basic solution is the same as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;suggested, just add by Day Hour to eventstats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex 
| bin span=1m _time
| stats sum(MIPS) as MIPSParMinute by _time

| eval Hour = strftime(_time, "%H"), Day = strftime(_time, "%F")
| eventstats max(MIPSParMinute) as MaxMIPSParMinute by Day Hour
| where MIPSParMinute == MaxMIPSParMinute
| sort - MaxMIPSParMinute Day
| dedup Day
| head 5&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will leave formating to you.&lt;/P&gt;&lt;P&gt;Here is an emulation you can play with and compare with real data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal earliest=-25d@d latest=-0d@d
| bin span=1m _time
| stats count as MIPSParMinute by _time
``` the above emulates
index=myindex 
| bin span=1m _time
| stats sum(MIPS) as MIPSParMinute by _time
```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 08:35:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709919#M239902</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2025-01-28T08:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I keep the value of the minutes in a span=1h timechart if I want to keep only the max value of the hour.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709962#M239912</link>
      <description>&lt;P&gt;Work perfectly.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 13:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709962#M239912</guid>
      <dc:creator>Splunked_Kid</dc:creator>
      <dc:date>2025-01-28T13:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I keep the value of the minutes in a span=1h timechart if I want to keep only the max value of the hour.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709974#M239915</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273476"&gt;@Splunked_Kid&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 14:46:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-keep-the-value-of-the-minutes-in-a-span-1h-timechart-if/m-p/709974#M239915</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-01-28T14:46:26Z</dc:date>
    </item>
  </channel>
</rss>

