<?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: Events count changing on every search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380897#M111434</link>
    <description>&lt;P&gt;Hi I used the below query&lt;BR /&gt;
    sourcetype="mylogdata" type="data" earliest=-1d@h-5 latest=-1d@h-3 HTTP_Status="202"&lt;BR /&gt;
    |timechart span=1h count &lt;/P&gt;

&lt;P&gt;The below output i got&lt;BR /&gt;
    _time                count&lt;BR /&gt;&lt;BR /&gt;
    2018-06-11 07:00    34 &lt;/P&gt;

&lt;P&gt;Just fyi, i have extracted fileds. What did i take over from the above query?&lt;BR /&gt;
I am observing event count change for almost all the hours.&lt;BR /&gt;
Also Please let me know the meaning of the below line&lt;BR /&gt;
earliest=-1d@h-5 latest=-1d@h-3&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jun 2018 08:59:27 GMT</pubDate>
    <dc:creator>prathapkcsc</dc:creator>
    <dc:date>2018-06-12T08:59:27Z</dc:date>
    <item>
      <title>Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380888#M111425</link>
      <description>&lt;P&gt;HI,&lt;BR /&gt;
  I am facing a weird situation. I am executing a query that will give last one day data on hourly basis.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search 
| search type="data" 
 | timechart span=1h count(eval(HTTP_Status="202")) as today_count 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;when i execute this 1st time i got some httpd requests count.&lt;BR /&gt;
When i execute above command 2nd time, i am seeing around 100-200 difference in the count for every hour.&lt;BR /&gt;
Why happening this?&lt;BR /&gt;
any help?&lt;BR /&gt;
Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 02:17:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380888#M111425</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2018-06-12T02:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380889#M111426</link>
      <description>&lt;P&gt;Are you seeing any yellow triangles on the results page? Have you used the job inspector to see if there are any problems? Are you using the same time period, like yesterday, or are you using something like last 24 hours?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 02:52:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380889#M111426</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2018-06-12T02:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380890#M111427</link>
      <description>&lt;P&gt;No. I am not seeing any yellow triangles. I am using same command with &lt;BR /&gt;
earliest=-24h@h latest=now.&lt;BR /&gt;
    at 1st run :&lt;BR /&gt;
    19th hour --&amp;gt; 52168&lt;BR /&gt;
    20th hour ---&amp;gt; 121115&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;at 2nd run :
19th hour : 52153
20th hour : 121082
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Like above event count is decreasing for every search. &lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 03:13:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380890#M111427</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2018-06-12T03:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380891#M111428</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/31889"&gt;@prathapkcsc&lt;/a&gt;, are you using pot-processing? Also is there is a reason for type="data" to be outside the base search? If you are just showing HTTP_Status=202, can you also add &lt;CODE&gt;HTTP_Status="202"&lt;/CODE&gt; to your base search? &lt;/P&gt;

&lt;P&gt;Following will give you today's 202 events with span=1h (assuming by last one day you mean today as you have renamed the count also as today_count).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourBaseSearch&amp;gt; type="data" HTTP_Status=202 earliest=-0d@d latest=now
| timechart span=1h count as today_count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:53:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380891#M111428</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T19:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380892#M111429</link>
      <description>&lt;P&gt;data is just like grep pattern from log data. &lt;BR /&gt;
    sourcetype="mylogdata" earliest=-5h@h latest=now HTTP_Status=202 &lt;BR /&gt;
    | search type="data"&lt;BR /&gt;
    | timechart span=1h count &lt;BR /&gt;
I am just giving the above query. some how values are changing on every search. At least am able to see 10-20 count difference. &lt;BR /&gt;
I have no idea about pot-processing.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 06:13:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380892#M111429</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2018-06-12T06:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380893#M111430</link>
      <description>&lt;P&gt;@prathapkcsc well if you are not using post processing there is nothing to investigate there. Can you try the following search and see the result counts?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="mylogdata" earliest=-6h@h latest=-1h@h HTTP_Status=202 type="data"
| timechart span=1h count 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the counts are still not matching, can you verify the Time on Raw Data and Time picked by _time field whether they match or not?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 06:26:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380893#M111430</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-06-12T06:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380894#M111431</link>
      <description>&lt;P&gt;I used the same command. Still am able to see the difference on every search. &lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 06:28:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380894#M111431</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2018-06-12T06:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380895#M111432</link>
      <description>&lt;P&gt;Raw data has EDT time zone and _time field showing in UTC timezone. &lt;BR /&gt;
Is this causing the issue?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 06:34:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380895#M111432</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2018-06-12T06:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380896#M111433</link>
      <description>&lt;P&gt;Try the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype="mylogdata" earliest=-1d@h-5 latest=-1d@h-3 HTTP_Status=202 type="data"
 | timechart span=1h count 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also check (in verbose mode) whether your raw data has date_hour field extracted.&lt;/P&gt;

&lt;P&gt;I am thinking for the following change might happen:&lt;BR /&gt;
1) Latest hour bucket as data is still flowing in.&lt;BR /&gt;
2) Your _time not picking up time correctly.&lt;/P&gt;

&lt;P&gt;Because of which I which I wanted you to test the time which has already passed and for which already events have been indexed.&lt;/P&gt;

&lt;P&gt;If date_hour is present you can also try &lt;CODE&gt;stats count by date_hour&lt;/CODE&gt; to see whether counts add up or not.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:53:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380896#M111433</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T19:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380897#M111434</link>
      <description>&lt;P&gt;Hi I used the below query&lt;BR /&gt;
    sourcetype="mylogdata" type="data" earliest=-1d@h-5 latest=-1d@h-3 HTTP_Status="202"&lt;BR /&gt;
    |timechart span=1h count &lt;/P&gt;

&lt;P&gt;The below output i got&lt;BR /&gt;
    _time                count&lt;BR /&gt;&lt;BR /&gt;
    2018-06-11 07:00    34 &lt;/P&gt;

&lt;P&gt;Just fyi, i have extracted fileds. What did i take over from the above query?&lt;BR /&gt;
I am observing event count change for almost all the hours.&lt;BR /&gt;
Also Please let me know the meaning of the below line&lt;BR /&gt;
earliest=-1d@h-5 latest=-1d@h-3&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 08:59:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380897#M111434</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2018-06-12T08:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380898#M111435</link>
      <description>&lt;P&gt;Try something like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; base search 
 | search type="data"
 | bin _time span=1h 
 | where HTTP_Status="202"
 | stats count as today_count by _time 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I suspect that &lt;CODE&gt;timechart&lt;/CODE&gt; is moving the boundaries of the &lt;CODE&gt;span&lt;/CODE&gt;, although that should not happen with &lt;CODE&gt;earliest=-24h@h&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The above method should give you exactly the same number of records for an hour each time it is run across the same hour.  If it does not, then you have (A) something going on with your data ingestion, or (B) something going on with records getting moved out of warm to cold or (C) indexers going offline for some reason.  &lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 23:14:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380898#M111435</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-06-12T23:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380899#M111436</link>
      <description>&lt;P&gt;Thanks for your reply..Let me try it out.will get you back with the result.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 01:25:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380899#M111436</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2018-06-13T01:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380900#M111437</link>
      <description>&lt;P&gt;Still am getting event count change on every run. Don't know the exact problem. I am observing this kind of change first time. our data is a real time log which will generate from mobile application. &lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 02:09:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380900#M111437</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2018-06-13T02:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380901#M111438</link>
      <description>&lt;P&gt;Still am getting event count change on every run. Don't know the exact problem. I am observing this kind of change first time. our data is a real time log which will generate from mobile application.&lt;BR /&gt;
May be different time zones causing this issue. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 06:27:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380901#M111438</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2018-06-14T06:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Events count changing on every search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380902#M111439</link>
      <description>&lt;P&gt;Look at the difference between &lt;CODE&gt;_time&lt;/CODE&gt; and the indextime. If you are east of UTC, that does seem like the most likely scenario. Especially if you are in UTC+2 or so, and the data count is only changing in the last two hours.&lt;/P&gt;

&lt;P&gt;See the following answer for information on seeing the difference between the timestamp and the index time:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/540344/how-to-compute-indextime-time-difference-average-w.html"&gt;https://answers.splunk.com/answers/540344/how-to-compute-indextime-time-difference-average-w.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 11:39:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-count-changing-on-every-search/m-p/380902#M111439</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2018-06-14T11:39:47Z</dc:date>
    </item>
  </channel>
</rss>

