<?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 to group events by date? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-events-by-date/m-p/508624#M142106</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/223609"&gt;@thl8490123&lt;/a&gt;&amp;nbsp;based on the screenshot and SPL provided in the question, you are better off running tstats query which will perform way better.&lt;BR /&gt;&lt;BR /&gt;Please try out the following SPL and confirm&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=main source IN ("wineventlog:application","wineventlog:System","wineventlog:security") by host _time source span=1mon
| eval {source}=count
| fields - source count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 11 Jul 2020 18:56:54 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2020-07-11T18:56:54Z</dc:date>
    <item>
      <title>How to group events by date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-events-by-date/m-p/508615#M142105</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I manage to get the view i want using below search command.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I know how to group the events by Month_Year format and display on the table besides the events?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current View&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Splunk Search.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9622iF29BD8DF940C95FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Splunk Search.png" alt="Splunk Search.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Expected&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Splunk Search.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9623i63D5E6FA63FE46F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Splunk Search.png" alt="Splunk Search.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 16:51:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-events-by-date/m-p/508615#M142105</guid>
      <dc:creator>thl8490123</dc:creator>
      <dc:date>2020-07-11T16:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to group events by date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-events-by-date/m-p/508624#M142106</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/223609"&gt;@thl8490123&lt;/a&gt;&amp;nbsp;based on the screenshot and SPL provided in the question, you are better off running tstats query which will perform way better.&lt;BR /&gt;&lt;BR /&gt;Please try out the following SPL and confirm&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=main source IN ("wineventlog:application","wineventlog:System","wineventlog:security") by host _time source span=1mon
| eval {source}=count
| fields - source count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 18:56:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-events-by-date/m-p/508624#M142106</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-07-11T18:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to group events by date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-events-by-date/m-p/508630#M142107</link>
      <description>&lt;P&gt;I tried to follow the image.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=main source IN ("wineventlog:application","wineventlog:System","wineventlog:security") by host _time source span=1mon 
| eval time=strftime(_time,"%b %Y") , hosts=host."::".time 
| fields - host _time 
| xyseries hosts source count 
| rex field=hosts "(?&amp;lt;host&amp;gt;.*)::(?&amp;lt;month&amp;gt;.*)" 
| table host month win* 
| addcoltotals 
| appendpipe 
    [ tail 1 
    | addtotals 
    | eval wineventlog:application = round('wineventlog:application' / Total * 100,2)
    | eval wineventlog:security = round('wineventlog:security' / Total * 100,2)
    | eval wineventlog:system = round('wineventlog:system' / Total * 100,2)
    | fields - Total]&lt;/LI-CODE&gt;&lt;P&gt;I am not able to use &lt;STRONG&gt;foreach &lt;/STRONG&gt;in subsearch.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| foreach win* [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = round(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; / Total * 100, 2) ]&lt;/LI-CODE&gt;&lt;P&gt;I'm disappointment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 22:43:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-events-by-date/m-p/508630#M142107</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-11T22:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to group events by date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-events-by-date/m-p/508646#M142113</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp;The sum total and percent in the screenshot is from the built in formatting option&amp;nbsp;for the Table. So SPL is not really needed!&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2020 03:59:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-events-by-date/m-p/508646#M142113</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-07-12T03:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to group events by date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-events-by-date/m-p/508661#M142116</link>
      <description>&lt;P&gt;I've never heard of it before.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2020 07:57:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-events-by-date/m-p/508661#M142116</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-12T07:57:51Z</dc:date>
    </item>
  </channel>
</rss>

