<?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: How to find the No. of users using application? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-No-of-users-using-application/m-p/633565#M220067</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below query worked for me.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Message = replace(_raw, ".+,\s *Message=", "")
| spath input=Message
| stats dc(user) as unique_users&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 07 Mar 2023 14:41:48 GMT</pubDate>
    <dc:creator>Ajit</dc:creator>
    <dc:date>2023-03-07T14:41:48Z</dc:date>
    <item>
      <title>How to find the No. of users using application?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-No-of-users-using-application/m-p/633185#M219954</link>
      <description>&lt;LI-CODE lang="markup"&gt;My log contains entries as shown below.

2023-03-03T14:14:12.718, Level=INFO, ProcessName=App-web, Thread=http-nio-80-exec-78, Code=c.m.Config, Message={"clientIp":"192.168.12.24","cost":1,"method":"GET","reqParam":{"userId":["25632"]},"resp":"{\"code\":1,\"data\":{\"list\":[{\"createDate\":1656942857926,\"groupId\":1000023,\"id\":1173,\"lastUpdate\":16569","user":"myemail@hotmail.com"}

I want to know how many users are using the application in last one hour.&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 06 Mar 2023 14:23:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-No-of-users-using-application/m-p/633185#M219954</guid>
      <dc:creator>Ajit</dc:creator>
      <dc:date>2023-03-06T14:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: No. of users using application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-No-of-users-using-application/m-p/633297#M220003</link>
      <description>&lt;P&gt;First, I think your log probably look like this instead:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2023-03-03T14:14:12.718, Level=INFO, ProcessName=App-web, Thread=http-nio-80-exec-78, Code=c.m.Config, Message={"clientIp":"192.168.12.24","cost":1,"method":"GET","reqParam":{"userId":["25632"]},"resp":"{\"code\":1,\"data\":{\"list\":[{\"createDate\":1656942857926,\"groupId\":1000023,\"id\":1173,\"lastUpdate\":16569\",\"user\":\"myemail@hotmail.com\"}]}}"}&lt;/LI-CODE&gt;&lt;P&gt;Second, you need to explain which field/node in Message represents a "user" in your question. &amp;nbsp;If I have to speculate, it is either userId in reqParam or data.user in resp; I further speculate that neither field, especially userId, can have multiple values in a single transaction. &amp;nbsp;So, I'll use this field.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Message = replace(_raw, ".+,\s *Message=", "")
| spath input=Message
| stats dc('reqParam.userId{}') as unique_users&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2023 10:59:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-No-of-users-using-application/m-p/633297#M220003</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-03-04T10:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the No. of users using application?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-No-of-users-using-application/m-p/633565#M220067</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below query worked for me.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Message = replace(_raw, ".+,\s *Message=", "")
| spath input=Message
| stats dc(user) as unique_users&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Mar 2023 14:41:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-No-of-users-using-application/m-p/633565#M220067</guid>
      <dc:creator>Ajit</dc:creator>
      <dc:date>2023-03-07T14:41:48Z</dc:date>
    </item>
  </channel>
</rss>

