<?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 Stats Count by day ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-by-day/m-p/659879#M227809</link>
    <description>&lt;P&gt;I have a query that gives me four totals for a month.&amp;nbsp; I am trying to figure out how to show each four total for each day searched ?&lt;/P&gt;&lt;P&gt;Here is what I have so far:&lt;/P&gt;&lt;P&gt;index=anIndex sourcetype=aSourcetype "SFTP upload finished" OR "File sent to MFS" OR "File download sent to user" OR "HTTP upload finished"&lt;BR /&gt;earliest=-0month@month latest=now&lt;BR /&gt;| bucket _time span=day&lt;BR /&gt;| stats count(eval(searchmatch("SFTP upload finished"))) as SFTPCount&lt;BR /&gt;count(eval(searchmatch("File sent to MFS"))) as MFSCount&lt;BR /&gt;count(eval(searchmatch("File download sent to user"))) as DWNCount&lt;BR /&gt;count(eval(searchmatch("HTTP upload finished"))) as HTTPCount&lt;BR /&gt;| table SFTPCount MFSCount DWNCount HTTPCount&lt;/P&gt;&lt;P&gt;SFTPCount MFSCount DWNCount HTTPCount&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;30843&lt;/TD&gt;&lt;TD&gt;535&lt;/TD&gt;&lt;TD&gt;1584&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now to show the results by each day ?&lt;/P&gt;&lt;P&gt;I have a line to specify my bucket ?&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2023 21:32:34 GMT</pubDate>
    <dc:creator>sjringo</dc:creator>
    <dc:date>2023-10-05T21:32:34Z</dc:date>
    <item>
      <title>Stats Count by day ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-by-day/m-p/659879#M227809</link>
      <description>&lt;P&gt;I have a query that gives me four totals for a month.&amp;nbsp; I am trying to figure out how to show each four total for each day searched ?&lt;/P&gt;&lt;P&gt;Here is what I have so far:&lt;/P&gt;&lt;P&gt;index=anIndex sourcetype=aSourcetype "SFTP upload finished" OR "File sent to MFS" OR "File download sent to user" OR "HTTP upload finished"&lt;BR /&gt;earliest=-0month@month latest=now&lt;BR /&gt;| bucket _time span=day&lt;BR /&gt;| stats count(eval(searchmatch("SFTP upload finished"))) as SFTPCount&lt;BR /&gt;count(eval(searchmatch("File sent to MFS"))) as MFSCount&lt;BR /&gt;count(eval(searchmatch("File download sent to user"))) as DWNCount&lt;BR /&gt;count(eval(searchmatch("HTTP upload finished"))) as HTTPCount&lt;BR /&gt;| table SFTPCount MFSCount DWNCount HTTPCount&lt;/P&gt;&lt;P&gt;SFTPCount MFSCount DWNCount HTTPCount&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;30843&lt;/TD&gt;&lt;TD&gt;535&lt;/TD&gt;&lt;TD&gt;1584&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now to show the results by each day ?&lt;/P&gt;&lt;P&gt;I have a line to specify my bucket ?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 21:32:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-by-day/m-p/659879#M227809</guid>
      <dc:creator>sjringo</dc:creator>
      <dc:date>2023-10-05T21:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count by day ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-by-day/m-p/659884#M227812</link>
      <description>&lt;P&gt;Not sure if I understand the question. You already bucketed _time. &amp;nbsp;The simplest is to just use it as groupby&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=anIndex sourcetype=aSourcetype "SFTP upload finished" OR "File sent to MFS" OR "File download sent to user" OR "HTTP upload finished"
earliest=-0month@month latest=now
| bucket _time span=day
| stats count(eval(searchmatch("SFTP upload finished"))) as SFTPCount
count(eval(searchmatch("File sent to MFS"))) as MFSCount
count(eval(searchmatch("File download sent to user"))) as DWNCount
count(eval(searchmatch("HTTP upload finished"))) as HTTPCount by _time&lt;/LI-CODE&gt;&lt;P&gt;Will this work?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 21:51:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-by-day/m-p/659884#M227812</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-10-05T21:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count by day ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-by-day/m-p/659885#M227813</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/238212"&gt;@sjringo&lt;/a&gt;&amp;nbsp; You're so close... you need a "BY _time" on your stats line&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;index=anIndex sourcetype=aSourcetype "SFTP upload finished" OR "File sent to MFS" OR "File download sent to user" OR "HTTP upload finished"
earliest=-0month@month latest=now
| bucket _time span=day
| stats count(eval(searchmatch("SFTP upload finished"))) as SFTPCount
count(eval(searchmatch("File sent to MFS"))) as MFSCount
count(eval(searchmatch("File download sent to user"))) as DWNCount
count(eval(searchmatch("HTTP upload finished"))) as HTTPCount BY _time&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 21:53:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-by-day/m-p/659885#M227813</guid>
      <dc:creator>efavreau</dc:creator>
      <dc:date>2023-10-05T21:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count by day ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-by-day/m-p/659887#M227814</link>
      <description>&lt;P&gt;Yup, I was trying to do the BY _time after each count ((...)) AS ... by _time&amp;nbsp; instead of doing it after the very last one...&lt;/P&gt;&lt;P&gt;I knew I was close I just was not seeing it !!!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 21:57:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-by-day/m-p/659887#M227814</guid>
      <dc:creator>sjringo</dc:creator>
      <dc:date>2023-10-05T21:57:43Z</dc:date>
    </item>
  </channel>
</rss>

