<?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: Reporting the number of events in an index in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Reporting-the-number-of-events-in-an-index/m-p/44791#M10580</link>
    <description>&lt;P&gt;Bhiley,&lt;/P&gt;

&lt;P&gt;Yes, there are limits in splunk, which you may be hitting up against.  See, in your search you are telling Splunk to RETURN all of this data and not just count it.&lt;BR /&gt;
Splunk has many analytic features, such as "stats" that have arguments like count.&lt;/P&gt;

&lt;P&gt;You probably want to do something like this:&lt;BR /&gt;
&lt;EM&gt;search = index=tal | stats count&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;If you want to be sure to just run this for the previous day you can use the timepicker in the search or do this:&lt;BR /&gt;
&lt;EM&gt;search = index=tal earliest=-24h@h latest=@d-1s | stats count&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;If you had multiple indexes you can do ... | stats count by index&lt;/P&gt;

&lt;P&gt;Find more about stats here: &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/stats"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/stats&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Best,&lt;BR /&gt;
Sean&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jul 2011 09:10:37 GMT</pubDate>
    <dc:creator>sdwilkerson</dc:creator>
    <dc:date>2011-07-19T09:10:37Z</dc:date>
    <item>
      <title>Reporting the number of events in an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Reporting-the-number-of-events-in-an-index/m-p/44790#M10579</link>
      <description>&lt;P&gt;I want to report the number of events in a given index using a scheduled overnight report and send the PDF output to myself.&lt;BR /&gt;
So in 'Manager&amp;gt;Searches and reports' I define a search :-&lt;/P&gt;

&lt;P&gt;Search = 'index=tal'    # name of index&lt;BR /&gt;
No time range&lt;BR /&gt;
Tick 'Schedule this search'&lt;BR /&gt;
Type = Basic&lt;BR /&gt;
Run every day at 6pm&lt;BR /&gt;
and enter email details for myself including the PDF report option&lt;/P&gt;

&lt;P&gt;The report doesn't return the expected number of events (&amp;gt; 150M) but instead gives a small total (around 220,000) - it seems to be limited by some threshold value that I don't understand.&lt;BR /&gt;
How do I get the report run for as long as required to tranverse the whole index and send me a report ? (leaving aside for the moment whether it's sensible to do this).&lt;/P&gt;

&lt;P&gt;Can supply any further info as required.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2011 03:32:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Reporting-the-number-of-events-in-an-index/m-p/44790#M10579</guid>
      <dc:creator>bhiley</dc:creator>
      <dc:date>2011-07-19T03:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting the number of events in an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Reporting-the-number-of-events-in-an-index/m-p/44791#M10580</link>
      <description>&lt;P&gt;Bhiley,&lt;/P&gt;

&lt;P&gt;Yes, there are limits in splunk, which you may be hitting up against.  See, in your search you are telling Splunk to RETURN all of this data and not just count it.&lt;BR /&gt;
Splunk has many analytic features, such as "stats" that have arguments like count.&lt;/P&gt;

&lt;P&gt;You probably want to do something like this:&lt;BR /&gt;
&lt;EM&gt;search = index=tal | stats count&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;If you want to be sure to just run this for the previous day you can use the timepicker in the search or do this:&lt;BR /&gt;
&lt;EM&gt;search = index=tal earliest=-24h@h latest=@d-1s | stats count&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;If you had multiple indexes you can do ... | stats count by index&lt;/P&gt;

&lt;P&gt;Find more about stats here: &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/stats"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/stats&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Best,&lt;BR /&gt;
Sean&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2011 09:10:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Reporting-the-number-of-events-in-an-index/m-p/44791#M10580</guid>
      <dc:creator>sdwilkerson</dc:creator>
      <dc:date>2011-07-19T09:10:37Z</dc:date>
    </item>
  </channel>
</rss>

