<?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 number of user access the site in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Count-number-of-user-access-the-site/m-p/143914#M40021</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;You would need an authenticated username, or at least the clientip, on each of the logs. Then you just can use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined | stats dc(clientip) by source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just as an example, change the values as necessary&lt;/P&gt;

&lt;P&gt;regards&lt;/P&gt;</description>
    <pubDate>Mon, 10 Feb 2014 14:35:54 GMT</pubDate>
    <dc:creator>gfuente</dc:creator>
    <dc:date>2014-02-10T14:35:54Z</dc:date>
    <item>
      <title>Count number of user access the site</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-number-of-user-access-the-site/m-p/143913#M40020</link>
      <description>&lt;P&gt;I have 5 sites S1, S2, S3, S4, S5, I used splunk to monitor all requests to these sites. Now I want to statistic number of user who access site S1, S2, S3, S4, S5 per day. For example my data is &lt;/P&gt;

&lt;P&gt;u1 accessed site s1&lt;/P&gt;

&lt;P&gt;u1 accessed site s2&lt;/P&gt;

&lt;P&gt;u1 accessed site s3&lt;/P&gt;

&lt;P&gt;u2 accessed site s1&lt;/P&gt;

&lt;P&gt;u1 accessed site s2&lt;/P&gt;

&lt;P&gt;u2 accessed site s4&lt;/P&gt;

&lt;P&gt;u3 accessed site s2&lt;/P&gt;

&lt;P&gt;u1 accessed site s1&lt;/P&gt;

&lt;P&gt;u1 accessed site s2&lt;/P&gt;

&lt;P&gt;u3 accessed site s2&lt;/P&gt;

&lt;P&gt;u4 accessed site s1&lt;/P&gt;

&lt;P&gt;My expected report is:&lt;/P&gt;

&lt;TABLE border="1px"&gt;
&lt;TBODY&gt;&lt;TR&gt;
&lt;TH&gt;S1&lt;/TH&gt;
&lt;TH&gt;S2&lt;/TH&gt;
&lt;TH&gt;S3&lt;/TH&gt;
&lt;TH&gt;S4&lt;/TH&gt;
&lt;TH&gt;S5&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;

&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;
Even s1 was accessed 4 times, but number of user is 3. Same as other sites&lt;/P&gt;

&lt;P&gt;How can I have this statistic with splunk 6.&lt;/P&gt;

&lt;P&gt;Thank for any suggestion.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 14:28:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-number-of-user-access-the-site/m-p/143913#M40020</guid>
      <dc:creator>ndkhoiits</dc:creator>
      <dc:date>2014-02-10T14:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count number of user access the site</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-number-of-user-access-the-site/m-p/143914#M40021</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;You would need an authenticated username, or at least the clientip, on each of the logs. Then you just can use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined | stats dc(clientip) by source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just as an example, change the values as necessary&lt;/P&gt;

&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 14:35:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-number-of-user-access-the-site/m-p/143914#M40021</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2014-02-10T14:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count number of user access the site</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-number-of-user-access-the-site/m-p/143915#M40022</link>
      <description>&lt;P&gt;Based on your events above:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search_for_events | rex field=_raw "(?&amp;lt;user&amp;gt;\w+)\saccessed\ssite\s(?&amp;lt;site&amp;gt;\w+)" | stats dc(user) by site
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You may need to change the regex depending if things have special characters or not. &lt;/P&gt;

&lt;P&gt;It would be even easier if you used a props/transform extraction to auto pull &lt;CODE&gt;&amp;lt;user&amp;gt;&lt;/CODE&gt; and &lt;CODE&gt;&amp;lt;site&amp;gt;&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 15:03:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-number-of-user-access-the-site/m-p/143915#M40022</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2014-02-10T15:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Count number of user access the site</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-number-of-user-access-the-site/m-p/143916#M40023</link>
      <description>&lt;P&gt;Assuming your data have fields user and site already extracted, you can use following to get list of unique users access these site per day.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search giving _time, user, site | timechart span=1d dc(user) by site
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Feb 2014 18:10:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-number-of-user-access-the-site/m-p/143916#M40023</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-02-10T18:10:54Z</dc:date>
    </item>
  </channel>
</rss>

