<?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: the max time of day in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338599#M170317</link>
    <description>&lt;P&gt;thank you for helping me &lt;/P&gt;

&lt;P&gt;but but I need the max value of everyday  per mouth  &lt;/P&gt;

&lt;P&gt;the table I want  like this&lt;/P&gt;

&lt;P&gt;time 2018-4-15  8：00  max_count  588&lt;BR /&gt;
time 2018-4-16 10：00&lt;BR /&gt;
max_count 600&lt;BR /&gt;
……&lt;/P&gt;

&lt;P&gt;can you help me &lt;/P&gt;

&lt;P&gt;sorry for troubling you  thanks&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 19:07:46 GMT</pubDate>
    <dc:creator>fzfengzhuang</dc:creator>
    <dc:date>2020-09-29T19:07:46Z</dc:date>
    <item>
      <title>the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338592#M170310</link>
      <description>&lt;P&gt;hello guys&lt;/P&gt;

&lt;P&gt;I have a problem at work  &lt;/P&gt;

&lt;P&gt;index=mailog relay=10.204.0.0 I timechart span=1h count I timechart span=1d max（count）as count1 I appendcols 「search index=mailog relay=10.203.0.0 I timechart span=1h count I timechart span=1d max（count）as count2」&lt;/P&gt;

&lt;P&gt;I get the max value of everyday  but I donot get the information what time is most&lt;BR /&gt;&lt;BR /&gt;
like 3/16  12：00  is most  how to display the information of time  &lt;/P&gt;

&lt;P&gt;plz help me &lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 02:05:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338592#M170310</guid>
      <dc:creator>baoamin</dc:creator>
      <dc:date>2018-04-17T02:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338593#M170311</link>
      <description>&lt;P&gt;Can you try: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | timechart  span=1h count as count  | timechart span=1d max(count) | eval _time=strftime(_time, "%Y-%m-%d %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Apr 2018 04:40:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338593#M170311</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-04-17T04:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338594#M170312</link>
      <description>&lt;P&gt;thank you   I tried it  but just display &lt;BR /&gt;
2018-04-10  00：00：00 &lt;BR /&gt;
2018-04-11  00：00：00&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;/P&gt;

&lt;P&gt;why does it do not display the real time  ？&lt;/P&gt;

&lt;P&gt;thanks &lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 05:45:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338594#M170312</guid>
      <dc:creator>baoamin</dc:creator>
      <dc:date>2018-04-17T05:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338595#M170313</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Your requirement is not very clear to me. Here is what I understand, you want the max count based on hour and your output should be something like day, the hour the count was max max count&lt;BR /&gt;
try &lt;CODE&gt;|timechart span=1h count as count |timechart span=1h max(count) as count1| eventstats max(count1) as max | where count1=max|eval day=strftime(_time, "%Y-%m-%d") |eval hour=strftime(_time, "%Y-%m-%d %H:%M:%S")| fields day,hour,count1 | fields - _time&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 10:25:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338595#M170313</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-04-17T10:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338596#M170314</link>
      <description>&lt;P&gt;Can you try something:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |timechart span=1h count as count  | eval date=strftime(_time, "%x") | eventstats max(count) as count1 by date | where count=count1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Apr 2018 10:40:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338596#M170314</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-04-17T10:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338597#M170315</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;In the search you are grouping the events by span=1h so it show the _time in this format 3/16 12 00:00&lt;BR /&gt;
If you want the what hour time frame it occured most then your search should be like this &lt;/P&gt;

&lt;P&gt;index=your time   | timechart  span=1h count as count |sort  1 count desc &lt;/P&gt;

&lt;P&gt;I used sort command to sort the results in descending order and takes only the first value which is max of count .&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 12:09:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338597#M170315</guid>
      <dc:creator>ssadanala1</dc:creator>
      <dc:date>2018-04-17T12:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338598#M170316</link>
      <description>&lt;P&gt;thank you every much &lt;/P&gt;

&lt;P&gt;I just want the max value of  mailog from hour 0 to 24 per day  &lt;/P&gt;

&lt;P&gt;and make  the table like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;IP1_max_cou  IP2_max_count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2018-4-15 9：00    256    270&lt;BR /&gt;
2018-4-16 11：00   328   255&lt;BR /&gt;
2018-4-17 10：00   156    123&lt;BR /&gt;&lt;BR /&gt;
2018-4-17 15：00   8      9&lt;/P&gt;

&lt;P&gt;sorry for troubling  you  &lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 00:15:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338598#M170316</guid>
      <dc:creator>fzfengzhuang</dc:creator>
      <dc:date>2018-04-18T00:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338599#M170317</link>
      <description>&lt;P&gt;thank you for helping me &lt;/P&gt;

&lt;P&gt;but but I need the max value of everyday  per mouth  &lt;/P&gt;

&lt;P&gt;the table I want  like this&lt;/P&gt;

&lt;P&gt;time 2018-4-15  8：00  max_count  588&lt;BR /&gt;
time 2018-4-16 10：00&lt;BR /&gt;
max_count 600&lt;BR /&gt;
……&lt;/P&gt;

&lt;P&gt;can you help me &lt;/P&gt;

&lt;P&gt;sorry for troubling you  thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:07:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338599#M170317</guid>
      <dc:creator>fzfengzhuang</dc:creator>
      <dc:date>2020-09-29T19:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338600#M170318</link>
      <description>&lt;P&gt;thank you for helping me&lt;/P&gt;

&lt;P&gt;but but I need the max value of everyday per mouth&lt;/P&gt;

&lt;P&gt;the table I want like this&lt;/P&gt;

&lt;P&gt;time 2018-4-15 8：00 max_count 588&lt;BR /&gt;
time 2018-4-16 10：00&lt;BR /&gt;
max_count 600&lt;BR /&gt;
……&lt;/P&gt;

&lt;P&gt;can you help me&lt;/P&gt;

&lt;P&gt;sorry for troubling you thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:07:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338600#M170318</guid>
      <dc:creator>fzfengzhuang</dc:creator>
      <dc:date>2020-09-29T19:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338601#M170319</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
You say you need the max value per hour and then you also say you need max value every day. If you look at @p_gurav 's query and mine they are almost identical.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;We first get the counts per hour via
timechart &lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;we then do an eventstats to    figure&lt;BR /&gt;
out the max of the count per    hour,&lt;BR /&gt;
for example at which hour was    the&lt;BR /&gt;
count max&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;we then simply put a    where filter&lt;BR /&gt;
out the particular hour    of the day&lt;BR /&gt;
where the count=max count    in step&lt;BR /&gt;
2 above.&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;why is our query results different from what you want?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 16:08:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338601#M170319</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-04-20T16:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338602#M170320</link>
      <description>&lt;P&gt;thank you sending me a message   it was solved&lt;/P&gt;

&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Sat, 21 Apr 2018 01:16:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338602#M170320</guid>
      <dc:creator>fzfeng</dc:creator>
      <dc:date>2018-04-21T01:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338603#M170321</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=mailog
| bucket _time span=1h
| stats count AS hourly_count BY host _time
| sort 0 - count
| dedup host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Apr 2018 04:01:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338603#M170321</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-04-21T04:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: the max time of day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338604#M170322</link>
      <description>&lt;P&gt;@baoamin, you can try this, you can paste all this request in your sarch bare,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| timechart span=1h count 
| eval day=strftime(_time,"%Y-%m-%d")
| eventstats max(count) as max by day
| where count=max
| fields _time, count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try by this to test your request:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=mailog relay=10.204.0.0 
|  timechart span=1h count 
| eval day=strftime(_time,"%Y-%m-%d")
| eventstats max(count) as max by day |  appendcols 
    [search index=mailog relay=10.203.0.0 | timechart span=1h count | eval day=strftime(_time,"%Y-%m-%d") | eventstats max(count) as max by day]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Apr 2018 13:17:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-max-time-of-day/m-p/338604#M170322</guid>
      <dc:creator>TISKAR</dc:creator>
      <dc:date>2018-04-21T13:17:53Z</dc:date>
    </item>
  </channel>
</rss>

