<?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 the total row number of a search result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-total-row-number-of-a-search-result/m-p/136297#M37272</link>
    <description>&lt;P&gt;I have a search string: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=databaseError "object is null" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to get the total row number of the result.&lt;/P&gt;

&lt;P&gt;need to display like underneath:&lt;/P&gt;

&lt;P&gt;object  is null error:  28&lt;/P&gt;</description>
    <pubDate>Mon, 06 Apr 2015 19:18:44 GMT</pubDate>
    <dc:creator>KShen</dc:creator>
    <dc:date>2015-04-06T19:18:44Z</dc:date>
    <item>
      <title>how to get the total row number of a search result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-total-row-number-of-a-search-result/m-p/136297#M37272</link>
      <description>&lt;P&gt;I have a search string: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=databaseError "object is null" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to get the total row number of the result.&lt;/P&gt;

&lt;P&gt;need to display like underneath:&lt;/P&gt;

&lt;P&gt;object  is null error:  28&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2015 19:18:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-total-row-number-of-a-search-result/m-p/136297#M37272</guid>
      <dc:creator>KShen</dc:creator>
      <dc:date>2015-04-06T19:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the total row number of a search result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-total-row-number-of-a-search-result/m-p/136298#M37273</link>
      <description>&lt;P&gt;This is a little vague.  Are you using this in a dashboard?  Or just in the search bar or what?  Traditionally you would use the &lt;CODE&gt;stats&lt;/CODE&gt; command to get a count of events.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=databaseError "object is null"  | stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But, if you're building a dashboard then you may want the events and the count both on the dashboard.  One as a single value field (using &lt;CODE&gt;| stats count&lt;/CODE&gt;) and one as a table of events.&lt;/P&gt;

&lt;P&gt;Perhaps you could clarify your use for this in order to help folks come up with the best answer?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2015 19:47:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-total-row-number-of-a-search-result/m-p/136298#M37273</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2015-04-06T19:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the total row number of a search result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-total-row-number-of-a-search-result/m-p/136299#M37274</link>
      <description>&lt;P&gt;Are you looking for something more detailed than the obvious 'stats count'?&lt;/P&gt;

&lt;P&gt;sourcetype=databaseError "object is null" | stats count&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2015 19:47:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-total-row-number-of-a-search-result/m-p/136299#M37274</guid>
      <dc:creator>bill_bartlett</dc:creator>
      <dc:date>2015-04-06T19:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the total row number of a search result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-total-row-number-of-a-search-result/m-p/136300#M37275</link>
      <description>&lt;P&gt;Hello! Here is what you can do: &lt;CODE&gt;sourcetype=databaseError|eval object_string=case(searchmatch("object is null"),"object is null")|stats count by object_string&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;You can take this as an example, with the _internal index:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal|eval error_tag=case(searchmatch("error"),"error")|stats count by object_tag
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Apr 2015 19:51:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-the-total-row-number-of-a-search-result/m-p/136300#M37275</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-04-06T19:51:49Z</dc:date>
    </item>
  </channel>
</rss>

