<?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: Add contributing fields to unique values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-contributing-fields-to-unique-values/m-p/598638#M208450</link>
    <description>&lt;P&gt;Thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2022 09:35:57 GMT</pubDate>
    <dc:creator>girtsgr</dc:creator>
    <dc:date>2022-05-20T09:35:57Z</dc:date>
    <item>
      <title>How to add contributing fields to unique values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-contributing-fields-to-unique-values/m-p/598511#M208410</link>
      <description>&lt;P&gt;Hi, I seem to be stuck with something pretty trivial. I have events with users and corresponding hostnames, eg:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;User&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;Hostname&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;user1&lt;/TD&gt;
&lt;TD width="50%"&gt;hostA&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;user1&lt;/TD&gt;
&lt;TD width="50%"&gt;hostB&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;user2&lt;/TD&gt;
&lt;TD width="50%"&gt;hostA&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;user2&lt;/TD&gt;
&lt;TD width="50%"&gt;hostC&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;user3&lt;/TD&gt;
&lt;TD width="50%"&gt;hostD&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to count unique user-hostname values and show the contributing hostnames for users that have used more that 1 hostname like this:&lt;/P&gt;
&lt;TABLE border="1" width="97.85353535353535%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;User &lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;STRONG&gt;Hostnames used&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;user1&lt;/TD&gt;
&lt;TD width="50%"&gt;hostA hostB&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;user2&lt;/TD&gt;
&lt;TD width="50%"&gt;hostA hostC&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This seems to take care of the first part of the task:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| stats dc(Hostname) as uh by User
| search uh &amp;gt; 1&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I add the contributing Hostnames?&lt;/P&gt;
&lt;P&gt;Formatting is not so important - it may be one field with all the hostnames like in the example above, or multiple fields, or one field together with the User field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 16:28:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-contributing-fields-to-unique-values/m-p/598511#M208410</guid>
      <dc:creator>girtsgr</dc:creator>
      <dc:date>2022-05-19T16:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Add contributing fields to unique values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-contributing-fields-to-unique-values/m-p/598514#M208412</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats values(hostname) as hostnames by User
| eval uh=mvcount(hostnames)
| where uh &amp;gt; 1&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 19 May 2022 14:28:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-contributing-fields-to-unique-values/m-p/598514#M208412</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-19T14:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Add contributing fields to unique values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-contributing-fields-to-unique-values/m-p/598638#M208450</link>
      <description>&lt;P&gt;Thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 09:35:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-contributing-fields-to-unique-values/m-p/598638#M208450</guid>
      <dc:creator>girtsgr</dc:creator>
      <dc:date>2022-05-20T09:35:57Z</dc:date>
    </item>
  </channel>
</rss>

