<?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: count on 2 fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/count-on-2-fields/m-p/107535#M27945</link>
    <description>&lt;P&gt;YES!!!!&lt;BR /&gt;
Thanks a lot&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2013 14:32:26 GMT</pubDate>
    <dc:creator>sgsplunk78</dc:creator>
    <dc:date>2013-10-21T14:32:26Z</dc:date>
    <item>
      <title>count on 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-on-2-fields/m-p/107531#M27941</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;The command Who returns me the log : &lt;BR /&gt;
USERNAME LINE HOSTNAME TIME root pts/1 PC1.domain.com Oct 21 14:17 root pts/2 PC2.domain.com Oct 21 14:17 USER3 pts/4 PC3.domain.com Oct 17 17:19&lt;BR /&gt;&lt;BR /&gt;
host = HOSTA source = who sourcetype = who&lt;/P&gt;

&lt;P&gt;I would like to know who is connecting to my servers and from which terminal. I use the command : index=Logs source="who" (host=HOSTA) | multikv forceheader=1  | chart count by HOSTNAME, host. &lt;BR /&gt;
Result = &lt;/P&gt;

&lt;P&gt;HOSTNAME ↧            HOSTA↕&lt;BR /&gt;&lt;BR /&gt;
PC1.domain.com        48&lt;BR /&gt;&lt;BR /&gt;
PC2.domain.com        4&lt;BR /&gt;&lt;BR /&gt;
PC3.domain.com        2  &lt;/P&gt;

&lt;P&gt;But there is not the column USERNAME. I would like, a colum : Hostname,a column : Username, and the column : Host containing the count as it's done at the moment. It will be very cool if I could have the last day the couple USERNAME/Hostname has been seen.&lt;/P&gt;

&lt;P&gt;Thanks for your help,&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2013 13:15:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-on-2-fields/m-p/107531#M27941</guid>
      <dc:creator>sgsplunk78</dc:creator>
      <dc:date>2013-10-21T13:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: count on 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-on-2-fields/m-p/107532#M27942</link>
      <description>&lt;P&gt;Have you tried:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=Logs source="who" (host=HOSTA) | multikv forceheader=1  | chart count by USERNAME,HOSTNAME,host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Oct 2013 13:36:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-on-2-fields/m-p/107532#M27942</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-21T13:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: count on 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-on-2-fields/m-p/107533#M27943</link>
      <description>&lt;P&gt;Yes,&lt;BR /&gt;
but it returns me : &lt;BR /&gt;
&lt;STRONG&gt;Error in 'chart' command: The argument 'host' is invalid.&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;It seems that if I put more than 2 fields after "chart count by", an error occurs....&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2013 13:41:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-on-2-fields/m-p/107533#M27943</guid>
      <dc:creator>sgsplunk78</dc:creator>
      <dc:date>2013-10-21T13:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: count on 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-on-2-fields/m-p/107534#M27944</link>
      <description>&lt;P&gt;do stats instead of chart&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2013 14:18:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-on-2-fields/m-p/107534#M27944</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2013-10-21T14:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: count on 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-on-2-fields/m-p/107535#M27945</link>
      <description>&lt;P&gt;YES!!!!&lt;BR /&gt;
Thanks a lot&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2013 14:32:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-on-2-fields/m-p/107535#M27945</guid>
      <dc:creator>sgsplunk78</dc:creator>
      <dc:date>2013-10-21T14:32:26Z</dc:date>
    </item>
  </channel>
</rss>

