<?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: How can I get a stats count number of events in a field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301658#M90833</link>
    <description>&lt;P&gt;stats count by field - gives me each event in that field and its count. i dont want that. i just want the number of events in that field.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2018 19:06:31 GMT</pubDate>
    <dc:creator>knarayana</dc:creator>
    <dc:date>2018-02-21T19:06:31Z</dc:date>
    <item>
      <title>How can I get a stats count number of events in a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301654#M90829</link>
      <description>&lt;P&gt;how to do a - stats count number of events in a field?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sm auth | status count(events) by Field.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is not working.&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Kiran&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 18:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301654#M90829</guid>
      <dc:creator>knarayana</dc:creator>
      <dc:date>2018-02-21T18:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a stats count number of events in a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301655#M90830</link>
      <description>&lt;P&gt;have you tried this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sm  | stats count by Field 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 18:09:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301655#M90830</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-21T18:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a stats count number of events in a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301656#M90831</link>
      <description>&lt;P&gt;Not entirely sure what you mean by "number of events in a field", but counting events simply works by doing "count", like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sm auth | stats count by Field
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 18:10:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301656#M90831</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-02-21T18:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a stats count number of events in a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301657#M90832</link>
      <description>&lt;P&gt;stats count by field - gives me each event in that field and its count. i dont want that. i just want the number of events in that field.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 19:06:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301657#M90832</guid>
      <dc:creator>knarayana</dc:creator>
      <dc:date>2018-02-21T19:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a stats count number of events in a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301658#M90833</link>
      <description>&lt;P&gt;stats count by field - gives me each event in that field and its count. i dont want that. i just want the number of events in that field.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 19:06:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301658#M90833</guid>
      <dc:creator>knarayana</dc:creator>
      <dc:date>2018-02-21T19:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a stats count number of events in a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301659#M90834</link>
      <description>&lt;P&gt;stats count by field - gives me each event in that field and its count. i dont want that. i just want the number of events in that field.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 19:07:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301659#M90834</guid>
      <dc:creator>knarayana</dc:creator>
      <dc:date>2018-02-21T19:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a stats count number of events in a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301660#M90835</link>
      <description>&lt;P&gt;so are you expecting total number of events then try simply stats count like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=sm auth  | stats count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 19:12:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301660#M90835</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-21T19:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a stats count number of events in a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301661#M90836</link>
      <description>&lt;P&gt;Can you by any chance post some screenshot of the result you get and then describe the desired outcome, because I still don't understand what you mean by "the number of events in that field" and what you mean by that stats command returns each event AND its count.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 19:16:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301661#M90836</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-02-21T19:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a stats count number of events in a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301662#M90837</link>
      <description>&lt;P&gt;The &lt;CODE&gt;| stats count by Field&lt;/CODE&gt; will provide you field value and count of events which have that value. Could you provide what you expect with some example data?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 19:31:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/301662#M90837</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-02-21T19:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a stats count number of events in a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/579508#M201933</link>
      <description>&lt;P&gt;Came across this while looking and saw it was still unresolved.&amp;nbsp; In essence, you are asking to provide count by Field.&amp;nbsp; You will have to specify field as you cannot simply ask to display count by field.&amp;nbsp; The example below takes data from index=sm where "auth" is present and to provide number of events by host,user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=sm auth | stats count by host, user&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 18:07:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/579508#M201933</guid>
      <dc:creator>nsanzar_splunk</dc:creator>
      <dc:date>2021-12-29T18:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a stats count number of events in a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/685303#M233832</link>
      <description>&lt;P&gt;Try&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| tstats count where index=sm&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Apr 2024 12:07:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-a-stats-count-number-of-events-in-a-field/m-p/685303#M233832</guid>
      <dc:creator>Symon</dc:creator>
      <dc:date>2024-04-24T12:07:48Z</dc:date>
    </item>
  </channel>
</rss>

