<?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: Show items which appear in clusters in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Show-items-which-appear-in-clusters/m-p/330138#M98266</link>
    <description>&lt;P&gt;how do you determine cluster size?I mean what is the logic to determine cluster size for the input you have given?&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jan 2018 07:50:39 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2018-01-23T07:50:39Z</dc:date>
    <item>
      <title>Show items which appear in clusters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-items-which-appear-in-clusters/m-p/330137#M98265</link>
      <description>&lt;P&gt;I have a log file of the following sort: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; vendor productId clusterId
A        1         1
B        2         1
A        3         1
C        4         4
D        8         8
D        9         8
D        10       10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I would like to select those vendors who have a least one productId which is contained in a cluster of size at least k. The cluster size corresponds to the number of rows with the same clusterId.&lt;/P&gt;

&lt;P&gt;So, in the example above, companies A and B both appear in  a cluster of size 3, D in a cluster of size 2 and company C in a cluster of size 1. &lt;/P&gt;

&lt;P&gt;In SQL I would solve this using sub-queries, but I am not sure how to tackle this in splunk. &lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 20:00:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-items-which-appear-in-clusters/m-p/330137#M98265</guid>
      <dc:creator>viggor</dc:creator>
      <dc:date>2018-01-22T20:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Show items which appear in clusters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-items-which-appear-in-clusters/m-p/330138#M98266</link>
      <description>&lt;P&gt;how do you determine cluster size?I mean what is the logic to determine cluster size for the input you have given?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 07:50:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-items-which-appear-in-clusters/m-p/330138#M98266</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-23T07:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Show items which appear in clusters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-items-which-appear-in-clusters/m-p/330139#M98267</link>
      <description>&lt;P&gt;The cluster size corresponds to the number of rows with the same clusterId.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 14:54:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-items-which-appear-in-clusters/m-p/330139#M98267</guid>
      <dc:creator>viggor</dc:creator>
      <dc:date>2018-01-23T14:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Show items which appear in clusters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-items-which-appear-in-clusters/m-p/330140#M98268</link>
      <description>&lt;P&gt;I did not understand A and B both appear in a cluster of size 3, D in a cluster of size 2 and company C in a cluster of size 1.&lt;BR /&gt;
I mean this does not match with no of rows with same cluster id . Kindly explain in detail.also put the corresponding size in a table..like at each row what will be the size &lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 15:22:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-items-which-appear-in-clusters/m-p/330140#M98268</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-23T15:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Show items which appear in clusters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-items-which-appear-in-clusters/m-p/330141#M98269</link>
      <description>&lt;P&gt;Try this (adjust where clause per your need)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search giving above output with fields vendor productId clusterId
| eventstats count as clusterSize by clusterId
| where clusterSize&amp;gt;k | stats count as productsCount by vendor
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jan 2018 18:46:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-items-which-appear-in-clusters/m-p/330141#M98269</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-01-23T18:46:09Z</dc:date>
    </item>
  </channel>
</rss>

