<?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: Print number of returned results with data if &amp;gt; 10,000 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127243#M34495</link>
    <description>&lt;P&gt;For example you could add a PostProcess module as a sibling of your Table module, do a &lt;CODE&gt;| stats count&lt;/CODE&gt; there, and display that in an HTML module.&lt;BR /&gt;
That's assuming you're in an AdvancedXML view. I'm sure similar things can be done using the SplunkJS stack, not so sure about SimpleXML.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jan 2014 15:20:23 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-01-28T15:20:23Z</dc:date>
    <item>
      <title>Print number of returned results with data if &gt; 10,000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127235#M34487</link>
      <description>&lt;P&gt;I have a “stats” search that returns millions of results.  Splunk can only show 10,000.  That’s OK but what I would like is the very first row on the search results page to show an accurate count of the number of results and then the 10,000 rows of data, in table format that I’m getting now, after that.  Is this possible?&lt;BR /&gt;
~Ed&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2014 21:52:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127235#M34487</guid>
      <dc:creator>OldManEd</dc:creator>
      <dc:date>2014-01-27T21:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Print number of returned results with data if &gt; 10,000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127236#M34488</link>
      <description>&lt;P&gt;You could append this to your search to get a count of events added to each row:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eventstats count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Jan 2014 22:01:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127236#M34488</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-01-27T22:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Print number of returned results with data if &gt; 10,000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127237#M34489</link>
      <description>&lt;P&gt;Yes, this will work but not really what I'm looking for.  Bedsides, I'm already using the "stats" and "count" field.  The search looks like this;  &lt;/P&gt;

&lt;P&gt;index="indexname" source="logname" host="&lt;EM&gt;partialhostname&lt;/EM&gt;"  | eval fieldNameTotal = fieldname1."-".fieldname2 | stats count by fieldnameTotal, fieldname3  | sort fieldname3&lt;/P&gt;

&lt;P&gt;Any other ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2014 14:15:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127237#M34489</guid>
      <dc:creator>OldManEd</dc:creator>
      <dc:date>2014-01-28T14:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Print number of returned results with data if &gt; 10,000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127238#M34490</link>
      <description>&lt;P&gt;If you already have a field called count you can do this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eventstats count as total_count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here's an entirely different idea: Leave your table as-is, and add an HTML panel above the table that prints out the number of results separately from the table.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2014 14:27:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127238#M34490</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-01-28T14:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Print number of returned results with data if &gt; 10,000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127239#M34491</link>
      <description>&lt;P&gt;One more option that your can try.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="indexname" source="logname" host="partialhostname" | eval fieldNameTotal = fieldname1."-".fieldname2 | stats count by fieldnameTotal, fieldname3 | addcoltotals | eval fieldname3 =if(isnull(fieldname3), "#Total Rows",fieldname3 ) | sort fieldname3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jan 2014 14:49:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127239#M34491</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-28T14:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Print number of returned results with data if &gt; 10,000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127240#M34492</link>
      <description>&lt;P&gt;A caveat for using &lt;CODE&gt;sort&lt;/CODE&gt;: It doesn't really like large result sets. You will at least need to specify a count of 0 to overcome the default restriction of 10000 events.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2014 14:52:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127240#M34492</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-01-28T14:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Print number of returned results with data if &gt; 10,000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127241#M34493</link>
      <description>&lt;P&gt;Martin, how would I do this?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2014 15:11:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127241#M34493</guid>
      <dc:creator>OldManEd</dc:creator>
      <dc:date>2014-01-28T15:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Print number of returned results with data if &gt; 10,000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127242#M34494</link>
      <description>&lt;P&gt;I tried the search above and I got my table fine, but I couldn't find the "#Total Rows" anywhere in the report.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2014 15:16:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127242#M34494</guid>
      <dc:creator>OldManEd</dc:creator>
      <dc:date>2014-01-28T15:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Print number of returned results with data if &gt; 10,000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127243#M34495</link>
      <description>&lt;P&gt;For example you could add a PostProcess module as a sibling of your Table module, do a &lt;CODE&gt;| stats count&lt;/CODE&gt; there, and display that in an HTML module.&lt;BR /&gt;
That's assuming you're in an AdvancedXML view. I'm sure similar things can be done using the SplunkJS stack, not so sure about SimpleXML.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2014 15:20:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127243#M34495</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-01-28T15:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Print number of returned results with data if &gt; 10,000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127244#M34496</link>
      <description>&lt;P&gt;OK, here's what I came up with that works for me.  I used the "dedup" and "accum" functions of Splunk.  The dedup got rid of duplicate events and the accum gave me a running total.  To get the total number of results, I simply run a sort on the resulting "total_count" column.  Thanks for everyone's help on this one.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="indexname" source="logname" host="*partialhostname*" | eval fieldNameTotal = fieldname1."-".fieldname2 | dedup fieldNameTotal | stats count by fieldNameTotal, fieldname3 | accum count AS total_count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jan 2014 15:47:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127244#M34496</guid>
      <dc:creator>OldManEd</dc:creator>
      <dc:date>2014-01-28T15:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Print number of returned results with data if &gt; 10,000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127245#M34497</link>
      <description>&lt;P&gt;It should be the first row in the table and "#Total Rows" should appear under fieldname3 column.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2014 16:06:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Print-number-of-returned-results-with-data-if-gt-10-000/m-p/127245#M34497</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-28T16:06:38Z</dc:date>
    </item>
  </channel>
</rss>

