<?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: Getting user count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381017#M168938</link>
    <description>&lt;P&gt;This can be established by a simple distinct count:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...your base search to get to this data...
| rex "^\S+\s+\S+\s+(?&amp;lt;user&amp;gt;\S+)"
| rex "agileBord=(?&amp;lt;agileBord&amp;gt;[^&amp;amp;]+)"
| stats dc(user) by agileBord
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Jun 2018 11:35:58 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-06-12T11:35:58Z</dc:date>
    <item>
      <title>Getting user count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381016#M168937</link>
      <description>&lt;P&gt;Our logs contain user name and the corresponding agile-board he used.&lt;BR /&gt;
A user might have used multiple agile-boards ; An agile-board could have been used my multiple users.&lt;BR /&gt;
I'm trying to figure out a count to illustrate 'how many (unique)users' had accessed each agile-board.&lt;/P&gt;

&lt;P&gt;====================================================================================&lt;BR /&gt;
Sample Event:&lt;/P&gt;

&lt;H1&gt;20.138.409.2 514x265646x9 &lt;STRONG&gt;ZQ93123&lt;/STRONG&gt; [12/Jun/2018:06:54:08 -0400] "POST /rest/analytics/1.0/publish/bulk HTTP/1.1" 200 - 2 "&lt;A href="https://phun.mayhem.com/secure/ActivBoard.jspa?agileBord=53322&amp;amp;view=planning&amp;amp;selectedIssue=KK-273"&gt;https://phun.mayhem.com/secure/ActivBoard.jspa?agileBord=53322&amp;amp;view=planning&amp;amp;selectedIssue=KK-273&lt;/A&gt;" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 1.0.51727; .NET CLR 5.4.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; wbx 1.0.0)" "a7fxqz"&lt;/H1&gt;

&lt;P&gt;ZQ93123 is the user name and 53322 is the agileBord name.&lt;BR /&gt;
If one user opens accesses the board, multiple events gets created with the same agile-board name and username. We ought to figure out the unique (total)count of users access per agileboard.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 11:24:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381016#M168937</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-06-12T11:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Getting user count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381017#M168938</link>
      <description>&lt;P&gt;This can be established by a simple distinct count:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...your base search to get to this data...
| rex "^\S+\s+\S+\s+(?&amp;lt;user&amp;gt;\S+)"
| rex "agileBord=(?&amp;lt;agileBord&amp;gt;[^&amp;amp;]+)"
| stats dc(user) by agileBord
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jun 2018 11:35:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381017#M168938</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-12T11:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Getting user count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381018#M168939</link>
      <description>&lt;P&gt;There is something wrong with my extraction. That's why  | stats command work with mine.&lt;BR /&gt;
Hence raised the question. I could use some help in extraction&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 12:31:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381018#M168939</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-06-12T12:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Getting user count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381019#M168940</link>
      <description>&lt;P&gt;Updated my answer with the rex commands to extract user and agileBord fields. Let me know if that helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 13:52:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381019#M168940</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-12T13:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting user count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381020#M168941</link>
      <description>&lt;P&gt;It does work brilliantly. Thank you.&lt;BR /&gt;
If I may add one more thing,&lt;BR /&gt;
Now, I see two columns, agilebord and dc(user) and the agilebord number is like 2234, 6784 etc...&lt;BR /&gt;
Instead of that can I have some string appended to it , so that the agilebord column looks like this&lt;BR /&gt;
&lt;A href="https://phun.mayhem.com/secure/SuperBoard.jspa?AgileView=2234"&gt;https://phun.mayhem.com/secure/SuperBoard.jspa?AgileView=2234&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://phun.mayhem.com/secure/SuperBoard.jspa?AgileView=6784"&gt;https://phun.mayhem.com/secure/SuperBoard.jspa?AgileView=6784&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 14:18:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381020#M168941</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-06-12T14:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Getting user count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381021#M168942</link>
      <description>&lt;P&gt;sure, just add the following at the end:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval agileBord = "https://phun.mayhem.com/secure/SuperBoard.jspa?AgileView=".agileBord
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jun 2018 15:00:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-user-count/m-p/381021#M168942</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-12T15:00:54Z</dc:date>
    </item>
  </channel>
</rss>

