<?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 How to get stats count to include zero count by time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-stats-count-to-include-zero-count-by-time/m-p/513537#M144083</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a lookup file like this -&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;users:&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;User1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;User2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;User3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;User4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;I need to count the events by user:&lt;/P&gt;&lt;P&gt;index=myindex&amp;nbsp;&lt;BR /&gt;| stats count as count by user&lt;BR /&gt;| inputlookup append=true userlist.csv&lt;BR /&gt;| fillnull count&lt;BR /&gt;| stats sum(count) as count by user&lt;BR /&gt;| table user count&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It shows me the number of events per user in the CSV file.&lt;BR /&gt;If a user has no events, the count is 0:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="23px"&gt;user&lt;/TD&gt;&lt;TD width="50%" height="23px"&gt;count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="23px"&gt;User1&lt;/TD&gt;&lt;TD width="50%" height="23px"&gt;2593&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="23px"&gt;User2&lt;/TD&gt;&lt;TD width="50%" height="23px"&gt;301&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="23px"&gt;User3&lt;/TD&gt;&lt;TD width="50%" height="23px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="23px"&gt;User4&lt;/TD&gt;&lt;TD width="50%" height="23px"&gt;1284&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I need the output additionally splitted over time (span=1h).&lt;BR /&gt;The output should look like this:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;time&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;user&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 11:00:00.000&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;1023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 11:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;190&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 11:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User3&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 11:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User4&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;1284&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 12:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;1570&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 12:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;111&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 12:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User3&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 12:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User4&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;time + 1h&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;...&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I saw few other questions in splunk answers but they didnt work for me...&lt;BR /&gt;&lt;/SPAN&gt;I hope you could help me. Thank a lot!&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2020 09:55:37 GMT</pubDate>
    <dc:creator>lukas</dc:creator>
    <dc:date>2020-08-11T09:55:37Z</dc:date>
    <item>
      <title>How to get stats count to include zero count by time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-stats-count-to-include-zero-count-by-time/m-p/513537#M144083</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a lookup file like this -&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;users:&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;User1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;User2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;User3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;User4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;I need to count the events by user:&lt;/P&gt;&lt;P&gt;index=myindex&amp;nbsp;&lt;BR /&gt;| stats count as count by user&lt;BR /&gt;| inputlookup append=true userlist.csv&lt;BR /&gt;| fillnull count&lt;BR /&gt;| stats sum(count) as count by user&lt;BR /&gt;| table user count&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It shows me the number of events per user in the CSV file.&lt;BR /&gt;If a user has no events, the count is 0:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="23px"&gt;user&lt;/TD&gt;&lt;TD width="50%" height="23px"&gt;count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="23px"&gt;User1&lt;/TD&gt;&lt;TD width="50%" height="23px"&gt;2593&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="23px"&gt;User2&lt;/TD&gt;&lt;TD width="50%" height="23px"&gt;301&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="23px"&gt;User3&lt;/TD&gt;&lt;TD width="50%" height="23px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="23px"&gt;User4&lt;/TD&gt;&lt;TD width="50%" height="23px"&gt;1284&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I need the output additionally splitted over time (span=1h).&lt;BR /&gt;The output should look like this:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;time&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;user&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 11:00:00.000&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;1023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 11:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;190&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 11:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User3&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 11:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User4&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;1284&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 12:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;1570&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 12:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;111&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 12:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User3&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;11.08.2020 12:00:00.000&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;User4&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;time + 1h&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;...&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="23px"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I saw few other questions in splunk answers but they didnt work for me...&lt;BR /&gt;&lt;/SPAN&gt;I hope you could help me. Thank a lot!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 09:55:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-stats-count-to-include-zero-count-by-time/m-p/513537#M144083</guid>
      <dc:creator>lukas</dc:creator>
      <dc:date>2020-08-11T09:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get stats count to include zero count by time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-stats-count-to-include-zero-count-by-time/m-p/513564#M144092</link>
      <description>&lt;P&gt;Perhaps this will help.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex 
| stats count as count by user
| inputlookup append=true userlist.csv
| fillnull count
| timechart span=1h sum(count) as count by user
| table user count&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 Aug 2020 12:50:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-stats-count-to-include-zero-count-by-time/m-p/513564#M144092</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-11T12:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to get stats count to include zero count by time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-stats-count-to-include-zero-count-by-time/m-p/513574#M144098</link>
      <description>&lt;P&gt;Thanks for the feedback. Unfortunately it does not work, if I use the timechart command like this, I do not get any results back.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 13:24:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-stats-count-to-include-zero-count-by-time/m-p/513574#M144098</guid>
      <dc:creator>lukas</dc:creator>
      <dc:date>2020-08-11T13:24:24Z</dc:date>
    </item>
  </channel>
</rss>

