<?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 Count unique values from a text result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Count-unique-values-from-a-text-result/m-p/90338#M23209</link>
    <description>&lt;P&gt;I have the following result from a simple query:&lt;/P&gt;

&lt;P&gt;184.168.152.54 10.10.42.61 - - [09/Oct/2013:09:14:38 -0500] "GET /tgg/api2.php?&lt;STRONG&gt;KeyID=k207238&lt;/STRONG&gt;&amp;amp;mode=xml&amp;amp;i=9780486472515 HTTP/1.1" 200 23 "-" "-" 0&lt;/P&gt;

&lt;P&gt;How can I get the unique values of &lt;STRONG&gt;KeyID&lt;/STRONG&gt; and their count?&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2013 14:17:41 GMT</pubDate>
    <dc:creator>aionius</dc:creator>
    <dc:date>2013-10-09T14:17:41Z</dc:date>
    <item>
      <title>Count unique values from a text result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-unique-values-from-a-text-result/m-p/90338#M23209</link>
      <description>&lt;P&gt;I have the following result from a simple query:&lt;/P&gt;

&lt;P&gt;184.168.152.54 10.10.42.61 - - [09/Oct/2013:09:14:38 -0500] "GET /tgg/api2.php?&lt;STRONG&gt;KeyID=k207238&lt;/STRONG&gt;&amp;amp;mode=xml&amp;amp;i=9780486472515 HTTP/1.1" 200 23 "-" "-" 0&lt;/P&gt;

&lt;P&gt;How can I get the unique values of &lt;STRONG&gt;KeyID&lt;/STRONG&gt; and their count?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2013 14:17:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-unique-values-from-a-text-result/m-p/90338#M23209</guid>
      <dc:creator>aionius</dc:creator>
      <dc:date>2013-10-09T14:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count unique values from a text result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-unique-values-from-a-text-result/m-p/90339#M23210</link>
      <description>&lt;P&gt;Try&lt;/P&gt;

&lt;P&gt;yoursearch | stats count by KeyID&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2013 14:21:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-unique-values-from-a-text-result/m-p/90339#M23210</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-09T14:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Count unique values from a text result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-unique-values-from-a-text-result/m-p/90340#M23211</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="yoursourcetype" | rex "KeyID=(?&amp;lt;KeyID&amp;gt;\w+)\&amp;amp;" | stats count by KeyID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2013 14:24:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-unique-values-from-a-text-result/m-p/90340#M23211</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2013-10-09T14:24:05Z</dc:date>
    </item>
  </channel>
</rss>

