<?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 Using cluster command and showing the unique contents of each cluster - How? in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/Using-cluster-command-and-showing-the-unique-contents-of-each/m-p/150780#M5638</link>
    <description>&lt;P&gt;I have a field in my events that can vary ever so subtly named "Serial". I am using the cluster command to combine these similar values into groups/clusters. This part works.&lt;/P&gt;

&lt;P&gt;However, I cannot figure out how to list out the unqiue values of making up each cluster after combining them. This is the whole point I'm trying to achieve... I need to know which values are closely related. The results only display ONE value for each cluster in the table. There are over 6,000 unique values that cluster down into 30~ clusters after running the command, and I need the list of 6,000 chopped up by cluster. &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Example data set that will return two clusters:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Serial=123456789&lt;/LI&gt;
&lt;LI&gt;Serial=123456788&lt;/LI&gt;
&lt;LI&gt;Serial=123456787&lt;/LI&gt;
&lt;LI&gt;Serial=987654321&lt;/LI&gt;
&lt;LI&gt;Serial=987654322&lt;/LI&gt;
&lt;LI&gt;Serial=987654323&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;The basic working query:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;index=stuff | cluster t=0.35
field=Serial | table cluster_count,
cluster_label, Serial | sort -
cluster_count&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Data returned from the query:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;30   1   123456789&lt;/LI&gt;
&lt;LI&gt;23   2   987654321&lt;/LI&gt;
&lt;/UL&gt;

&lt;HR /&gt;

&lt;P&gt;My questions is: How do I list out the values for each cluster instead of just one? Below is what I expected to work but it returns the same as above. One "Serial" value per count_label value. I thought it would return all of the values in each cluster_label:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;index=stuff Serial="*" | cluster
t=0.35 field=Serial | stats
values(Serial) by cluster_label&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Help!&lt;/P&gt;</description>
    <pubDate>Fri, 02 May 2014 19:15:49 GMT</pubDate>
    <dc:creator>thisissplunk</dc:creator>
    <dc:date>2014-05-02T19:15:49Z</dc:date>
    <item>
      <title>Using cluster command and showing the unique contents of each cluster - How?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Using-cluster-command-and-showing-the-unique-contents-of-each/m-p/150780#M5638</link>
      <description>&lt;P&gt;I have a field in my events that can vary ever so subtly named "Serial". I am using the cluster command to combine these similar values into groups/clusters. This part works.&lt;/P&gt;

&lt;P&gt;However, I cannot figure out how to list out the unqiue values of making up each cluster after combining them. This is the whole point I'm trying to achieve... I need to know which values are closely related. The results only display ONE value for each cluster in the table. There are over 6,000 unique values that cluster down into 30~ clusters after running the command, and I need the list of 6,000 chopped up by cluster. &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Example data set that will return two clusters:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Serial=123456789&lt;/LI&gt;
&lt;LI&gt;Serial=123456788&lt;/LI&gt;
&lt;LI&gt;Serial=123456787&lt;/LI&gt;
&lt;LI&gt;Serial=987654321&lt;/LI&gt;
&lt;LI&gt;Serial=987654322&lt;/LI&gt;
&lt;LI&gt;Serial=987654323&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;The basic working query:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;index=stuff | cluster t=0.35
field=Serial | table cluster_count,
cluster_label, Serial | sort -
cluster_count&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Data returned from the query:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;30   1   123456789&lt;/LI&gt;
&lt;LI&gt;23   2   987654321&lt;/LI&gt;
&lt;/UL&gt;

&lt;HR /&gt;

&lt;P&gt;My questions is: How do I list out the values for each cluster instead of just one? Below is what I expected to work but it returns the same as above. One "Serial" value per count_label value. I thought it would return all of the values in each cluster_label:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;index=stuff Serial="*" | cluster
t=0.35 field=Serial | stats
values(Serial) by cluster_label&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Help!&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2014 19:15:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Using-cluster-command-and-showing-the-unique-contents-of-each/m-p/150780#M5638</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2014-05-02T19:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using cluster command and showing the unique contents of each cluster - How?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Using-cluster-command-and-showing-the-unique-contents-of-each/m-p/150781#M5639</link>
      <description>&lt;P&gt;If I understand you correctly, what you are looking for is the 'labelonly=true' option. This will return to you all of your events, but still grouped into your clusters.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=stuff Serial="*" | cluster t=0.35 field=Serial labelonly=true&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So with your example you will get this:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
30 1 123456789&lt;BR /&gt;
30 1 123456788&lt;BR /&gt;
30 1 123456787&lt;BR /&gt;
23 2 987654321&lt;BR /&gt;
23 2 987654322&lt;BR /&gt;
23 2 987654323&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;You can then see only the events from a specific cluster by searching on the cluster_label.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=stuff Serial="*" | cluster t=0.35 field=Serial labelonly=true | search cluster_label=2&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;will return this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
23 2 987654321&lt;BR /&gt;
23 2 987654322&lt;BR /&gt;
23 2 987654323&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 15:57:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Using-cluster-command-and-showing-the-unique-contents-of-each/m-p/150781#M5639</guid>
      <dc:creator>emccaslin</dc:creator>
      <dc:date>2014-05-29T15:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using cluster command and showing the unique contents of each cluster - How?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Using-cluster-command-and-showing-the-unique-contents-of-each/m-p/150782#M5640</link>
      <description>&lt;P&gt;This is exactly what I was looking for. The definition of labelonly did not make this obvious until I read it over a few times. Not sure why this isn't the default option.&lt;/P&gt;

&lt;P&gt;Thank you. Now I know what data I'm looking at.&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 16:18:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Using-cluster-command-and-showing-the-unique-contents-of-each/m-p/150782#M5640</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2014-05-29T16:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using cluster command and showing the unique contents of each cluster - How?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Using-cluster-command-and-showing-the-unique-contents-of-each/m-p/150783#M5641</link>
      <description>&lt;P&gt;Glad to help!&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 19:33:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Using-cluster-command-and-showing-the-unique-contents-of-each/m-p/150783#M5641</guid>
      <dc:creator>emccaslin</dc:creator>
      <dc:date>2014-05-29T19:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using cluster command and showing the unique contents of each cluster - How?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Using-cluster-command-and-showing-the-unique-contents-of-each/m-p/150784#M5642</link>
      <description>&lt;P&gt;Is there any way to view the unique contents of all the clusters in one view? The above command displays the results only for one cluster label. &lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 07:35:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Using-cluster-command-and-showing-the-unique-contents-of-each/m-p/150784#M5642</guid>
      <dc:creator>KrithikaRamakri</dc:creator>
      <dc:date>2018-07-31T07:35:58Z</dc:date>
    </item>
  </channel>
</rss>

