<?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 Getting the counts by day but keeping the timestamp in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Getting-the-counts-by-day-but-keeping-the-timestamp/m-p/429565#M122863</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
Messing with dns logs im trying to get the domain that was only queried afew times per day. However i would also like to keep the timestamp so i know the time of query as well, any way i can do this? my current method is &lt;BR /&gt;
"|stats count by Date,Query|where count &amp;lt; 5 "   but this remove the timestamp&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2019 02:06:30 GMT</pubDate>
    <dc:creator>totaro</dc:creator>
    <dc:date>2019-04-30T02:06:30Z</dc:date>
    <item>
      <title>Getting the counts by day but keeping the timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-the-counts-by-day-but-keeping-the-timestamp/m-p/429565#M122863</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Messing with dns logs im trying to get the domain that was only queried afew times per day. However i would also like to keep the timestamp so i know the time of query as well, any way i can do this? my current method is &lt;BR /&gt;
"|stats count by Date,Query|where count &amp;lt; 5 "   but this remove the timestamp&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 02:06:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-the-counts-by-day-but-keeping-the-timestamp/m-p/429565#M122863</guid>
      <dc:creator>totaro</dc:creator>
      <dc:date>2019-04-30T02:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the counts by day but keeping the timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-the-counts-by-day-but-keeping-the-timestamp/m-p/429566#M122864</link>
      <description>&lt;P&gt;Hi totaro,&lt;/P&gt;

&lt;P&gt;try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search here
| stats count values(timestamp) AS timestamp by Date, Query
| where count &amp;lt; 5
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this will keep a single or multivalve field with the timestamp in it.&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 03:50:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-the-counts-by-day-but-keeping-the-timestamp/m-p/429566#M122864</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-04-30T03:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the counts by day but keeping the timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-the-counts-by-day-but-keeping-the-timestamp/m-p/429567#M122865</link>
      <description>&lt;P&gt;Try these:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eventstats count BY Date Query | where count &amp;lt; 5 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...  | stats count list(_time) AS _time BY Date Query | where count &amp;lt; 5
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Apr 2019 04:52:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-the-counts-by-day-but-keeping-the-timestamp/m-p/429567#M122865</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-30T04:52:32Z</dc:date>
    </item>
  </channel>
</rss>

