<?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 get total count of endpoints based on ClientID? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492897#M137470</link>
    <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval Endpoint = "/v1/foo/billToAccount/division/foo2/customer/foo3/billTo /v1/bar/billToAccount/division/bar2/customer/bar3/billTo /v1/bat/billToAccount/division/bat2/customer/bat3/billTo /v1/foo/search/account /vi/bar/search/account /vi/bat/search/account"
| makemv Endpoint
| mvexpand Endpoint
| streamstats count AS trace
| eval clientID = if(trace&amp;lt;=3, "FirstFour", "LastTwo")

| rename COMMENNT AS "Everything above generates sample event data; everything below is your solution"

| rex field=Endpoint "^\/(?&amp;lt;version&amp;gt;[^\/]+)\/(?&amp;lt;segment2&amp;gt;[^\/]+)\/(?&amp;lt;segment3&amp;gt;[^\/]+)\/(?&amp;lt;segment4&amp;gt;[^\/]+)(?:\/(?&amp;lt;segment5&amp;gt;[^\/]+)\/(?&amp;lt;segment6&amp;gt;[^\/]+)\/(?&amp;lt;segment7&amp;gt;[^\/]+)\/(?&amp;lt;segment8&amp;gt;[^\/]+))?"
| rex field=Endpoint mode=sed "s/^(\/[^\/]+\/)[^\/]+(\/[^\/]+\/[^\/]+\/)[^\/]+(\/[^\/]+\/)[^\/]+(.*)$/\1*\2*\3*\4/ s/^(\/[^\/]+\/)[^\/]+(.*)$/\1*\2/"
| stats count BY clientID Endpoint
| sort 0 - count
| stats list(*) AS * sum(count) AS subTotal BY clientID
| rename clientID as Consumer
| addtotals col=t row=f
| fillnull value="GRAND TOTAL" Consumer
| eval count=if(Consumer=="GRAND TOTAL", null(), count)
| table Consumer subTotal count Endpoint
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 23 Nov 2019 17:49:17 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-11-23T17:49:17Z</dc:date>
    <item>
      <title>How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492891#M137464</link>
      <description>&lt;P&gt;I am trying find solution to get Total count of URL Endpoints by field. &lt;BR /&gt;
In this case by ClientID. &lt;/P&gt;

&lt;P&gt;Below is example of Endpoint:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/{version}/{tenantId}/search/account/{AccountNumber}. 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As Endpoints are dynamic, is there any way to get results that include URLs, Total Count by Consumer.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 19:55:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492891#M137464</guid>
      <dc:creator>sameena822</dc:creator>
      <dc:date>2019-11-22T19:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492892#M137465</link>
      <description>&lt;P&gt;@sameena822 Can you add a log sample (fuzz any sensitive info)? That way we can see...&lt;BR /&gt;
- what your logs look like, in case there's a need for a regular expression to get the fields you need, beyond what you posted&lt;BR /&gt;
- what you mean by dynamic, because this sounds ambiguous&lt;BR /&gt;
- what a single "event" is, in order to get a count&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 20:16:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492892#M137465</guid>
      <dc:creator>efavreau</dc:creator>
      <dc:date>2019-11-22T20:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492893#M137466</link>
      <description>&lt;P&gt;I am completely lost.  Is this a question about data already in Splunk or a question about hitting a URL endpoint to get data into Splunk?  Either way, we need way more detail to get an answer.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 20:21:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492893#M137466</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-22T20:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492894#M137467</link>
      <description>&lt;P&gt;Hi @efavreau , Below are sample of events.&lt;/P&gt;

&lt;P&gt;Sample 1:&lt;BR /&gt;
2019-11-22 13:33:00,394 http-nio-8101-exec-11 INFO  RequestFilter [trace=0909642b66224b25, span=d9b011f5c79bd083, userID=, clientID=ele-app-identity-usr, appName=IRIS,ele-app-identity, deviceId=a4393ebf3b17713ef24a2b77acaf5696] - starting &lt;STRONG&gt;/v1/*/search/account&lt;/STRONG&gt;, gitId 0e8af6a, &lt;EM&gt;clientId&lt;/EM&gt; ele-app-identity-usr, userId null, appName IRIS,ele-app-identity, deviceIda4393ebf3b17713ef24a2b77acaf5696&lt;/P&gt;

&lt;P&gt;Sample 2:&lt;BR /&gt;
2019-11-22 13:33:00,999 http-nio-8101-exec-16 INFO  PathParmRedirectingFilter [trace=, span=, userID=TCHANDLER, &lt;STRONG&gt;&lt;EM&gt;clientID&lt;/EM&gt;&lt;/STRONG&gt;=iris-client, appName=ARKE,ele-app-cc, deviceId=9f4d6f097b554a75ab7bce5b09ac04c5] - Base64 Request Forwarded to &lt;STRONG&gt;/v1/{&lt;EM&gt;}/billToAccount/division/DC/customer/{&lt;/EM&gt;}/billTo?billTo=%2540B09247&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Sample 3:&lt;BR /&gt;
2019-11-22 13:33:00,963 http-nio-8101-exec-9 INFO  RequestFilter [trace=02a5d3c96b20fb9c, span=db22b4a3ff5b0520, userID=, clientID=gnp-usr, appName=, deviceId=] - starting &lt;STRONG&gt;/v1/{&lt;EM&gt;}/billToAccount/division/ATL/customer/{&lt;/EM&gt;}/billTo&lt;/STRONG&gt;, gitId 0e8af6a, &lt;EM&gt;clientId&lt;/EM&gt; gnp-usr, userId null, appName null, deviceIdnull&lt;/P&gt;

&lt;P&gt;And yes, I had to write regular expression to extract Endpoint as field1 &lt;BR /&gt;
I have used below query to get Total Count of Endpoints used by different Consumer:&lt;BR /&gt;
index=**  "/v1/{&lt;EM&gt;}/billToAccount/division/&lt;/EM&gt;/customer/&lt;EM&gt;/billTo" sourcetype=xx | rex "^[^]\n]&lt;/EM&gt;]\s+-\s+\w+\s+(?P[^,]+)" | stats count(URL) as TotalCount , first(trace) as TraceID by clientID | rename clientID as Consumer | dedup TraceID | table Consumer, TotalCount | sort -TotalCount | addcoltotals&lt;/P&gt;

&lt;P&gt;I got following results:&lt;BR /&gt;
ClientId1  100 Records&lt;BR /&gt;
ClientID2  20 Records&lt;/P&gt;

&lt;P&gt;Now, I am looking group all different endpoints by single ClientID (Consumer):&lt;/P&gt;

&lt;P&gt;URL                                                                                                                 TotalCount&lt;BR /&gt;
&lt;STRONG&gt;/v1/&lt;EM&gt;/billToAccount/division/ATL/customer/&lt;/EM&gt;/billTo&lt;/STRONG&gt;                       100&lt;BR /&gt;
&lt;STRONG&gt;/v1/*/search/account&lt;/STRONG&gt;                                                                            2000&lt;/P&gt;

&lt;P&gt;Note - Where I have wildcard(*), we have different values.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 21:50:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492894#M137467</guid>
      <dc:creator>sameena822</dc:creator>
      <dc:date>2019-11-22T21:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492895#M137468</link>
      <description>&lt;P&gt;Hi @woodcock , Yes, we already have data in Splunk. &lt;BR /&gt;
Below are the sample endpoints:&lt;BR /&gt;
1. /v1/{&lt;EM&gt;}/billToAccount/division/{&lt;/EM&gt;}/customer/{&lt;EM&gt;}/billTo&lt;BR /&gt;
2. /v1/{&lt;/EM&gt;}/search/account&lt;/P&gt;

&lt;P&gt;I have used below query to get count of Endpoint by each ClientID:&lt;BR /&gt;
index=** "/v1/{&lt;EM&gt;}/billToAccount/division/{&lt;/EM&gt;}/customer/{&lt;EM&gt;}/billTo" sourcetype=xx | rex "^[^]\n]&lt;/EM&gt;]\s+-\s+\w+\s+(?P[^,]+)" | stats count(Endpoint) as TotalCount , first(trace) as TraceID by clientID | rename clientID as Consumer | dedup TraceID | table Consumer, TotalCount | sort -TotalCount | addcoltotals&lt;/P&gt;

&lt;P&gt;Below are my search results:&lt;BR /&gt;
Consumer   Count(Endpoint)&lt;BR /&gt;
ClientID1     100&lt;BR /&gt;
ClientID2      20&lt;/P&gt;

&lt;P&gt;Now, I am looking for following results:&lt;BR /&gt;
For ClientIDs:&lt;BR /&gt;
&lt;STRONG&gt;ClientID1&lt;/STRONG&gt;&lt;BR /&gt;
Endpoint                                                                                            Count&lt;BR /&gt;
/v1/&lt;EM&gt;/billToAccount/division/&lt;/EM&gt;/customer/&lt;EM&gt;/billTo                         60&lt;BR /&gt;
 /v1/&lt;/EM&gt;/search/account                                                                          6&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;ClientID2&lt;/STRONG&gt;&lt;BR /&gt;
Endpoint                                                                                           Count&lt;BR /&gt;
/v1/&lt;EM&gt;/billToAccount/division/&lt;/EM&gt;/customer/&lt;EM&gt;/billTo                       40&lt;BR /&gt;
 /v1/&lt;/EM&gt;/search/account                                                                       14&lt;/P&gt;

&lt;P&gt;Note - Wherever we have wildcard {*) , there is different values each time. Was wondering how do we get count based on endpoint.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 22:04:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492895#M137468</guid>
      <dc:creator>sameena822</dc:creator>
      <dc:date>2019-11-22T22:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492896#M137469</link>
      <description>&lt;P&gt;@sameena822 I couldn't get your query to work for several reasons. However, you're stating you want to have the endpoint, the count of that endpoint, and to do it by clientID. Assuming you can get your regular expressions in order, you are looking for a stats command:&lt;BR /&gt;
 &lt;CODE&gt;| stats count(Endpoint) AS Count BY clientID Endpoint&lt;/CODE&gt;&lt;BR /&gt;
I think what you were missing, was that you can do more than one field after the BY.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Nov 2019 02:01:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492896#M137469</guid>
      <dc:creator>efavreau</dc:creator>
      <dc:date>2019-11-23T02:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492897#M137470</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval Endpoint = "/v1/foo/billToAccount/division/foo2/customer/foo3/billTo /v1/bar/billToAccount/division/bar2/customer/bar3/billTo /v1/bat/billToAccount/division/bat2/customer/bat3/billTo /v1/foo/search/account /vi/bar/search/account /vi/bat/search/account"
| makemv Endpoint
| mvexpand Endpoint
| streamstats count AS trace
| eval clientID = if(trace&amp;lt;=3, "FirstFour", "LastTwo")

| rename COMMENNT AS "Everything above generates sample event data; everything below is your solution"

| rex field=Endpoint "^\/(?&amp;lt;version&amp;gt;[^\/]+)\/(?&amp;lt;segment2&amp;gt;[^\/]+)\/(?&amp;lt;segment3&amp;gt;[^\/]+)\/(?&amp;lt;segment4&amp;gt;[^\/]+)(?:\/(?&amp;lt;segment5&amp;gt;[^\/]+)\/(?&amp;lt;segment6&amp;gt;[^\/]+)\/(?&amp;lt;segment7&amp;gt;[^\/]+)\/(?&amp;lt;segment8&amp;gt;[^\/]+))?"
| rex field=Endpoint mode=sed "s/^(\/[^\/]+\/)[^\/]+(\/[^\/]+\/[^\/]+\/)[^\/]+(\/[^\/]+\/)[^\/]+(.*)$/\1*\2*\3*\4/ s/^(\/[^\/]+\/)[^\/]+(.*)$/\1*\2/"
| stats count BY clientID Endpoint
| sort 0 - count
| stats list(*) AS * sum(count) AS subTotal BY clientID
| rename clientID as Consumer
| addtotals col=t row=f
| fillnull value="GRAND TOTAL" Consumer
| eval count=if(Consumer=="GRAND TOTAL", null(), count)
| table Consumer subTotal count Endpoint
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 Nov 2019 17:49:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492897#M137470</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-23T17:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492898#M137471</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="2019-11-22 13:33:00,394 http-nio-8101-exec-11 INFO RequestFilter [trace=0909642b66224b25, span=d9b011f5c79bd083, userID=, clientID=ele-app-identity-usr, appName=IRIS,ele-app-identity, deviceId=a4393ebf3b17713ef24a2b77acaf5696] - starting **/v1//search/account*, gitId 0e8af6a, clientId ele-app-identity-usr, userId null, appName IRIS,ele-app-identity, deviceIda4393ebf3b17713ef24a2b77acaf5696
 2019-11-22 13:33:00,999 http-nio-8101-exec-16 INFO PathParmRedirectingFilter [trace=, span=, userID=TCHANDLER, clientID=iris-client, appName=ARKE,ele-app-cc, deviceId=9f4d6f097b554a75ab7bce5b09ac04c5] - Base64 Request Forwarded to /v1/{}/billToAccount/division/DC/customer/{}/billTo?billTo=%2540B09247
 2019-11-22 13:33:00,963 http-nio-8101-exec-9 INFO RequestFilter [trace=02a5d3c96b20fb9c, span=db22b4a3ff5b0520, userID=, clientID=gnp-usr, appName=, deviceId=] - starting /v1/{}/billToAccount/division/ATL/customer/{}/billTo, gitId 0e8af6a, clientId gnp-usr, userId null, appName null, deviceIdnull" 
| makemv delim="
 " raw 
| mvexpand raw 
| table raw 
| rename raw as _raw 
| rex "(?: \-).*( starting| to) (?&amp;lt;endpoint&amp;gt;[^,]+)" 
| rex field=endpoint "(?&amp;lt;URL&amp;gt;\/v1[^?]+)" 
| kv 
| stats count by clientID URL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;there is a few sample log, I am not sure the result is corrent&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2019 14:31:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492898#M137471</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-11-24T14:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492899#M137472</link>
      <description>&lt;P&gt;@woodcock - your solution partially worked .. I was able to get total and grand total. But the thing is, we have close to 100 Endpoints. In that case, how would it work? Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 15:58:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492899#M137472</guid>
      <dc:creator>sameena822</dc:creator>
      <dc:date>2019-12-04T15:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492900#M137473</link>
      <description>&lt;P&gt;@efavreau  - I have included | stats count(Endpoint) AS Count BY clientID Endpoint , but still it didn't work. &lt;BR /&gt;
This is regex which I have used and it worked fine for me  [  rex "^[^]\n]*]\s+-\s+\w+\s+(?P[^,]+)" ]. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 16:01:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492900#M137473</guid>
      <dc:creator>sameena822</dc:creator>
      <dc:date>2019-12-04T16:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492901#M137474</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt; - I tried modified the query and added up more segments to mode=sed command and I was able to get results but I am not able strip values at the end of URL. Probably there might be minor thing which I might be missing.&lt;/P&gt;

&lt;P&gt;Query:&lt;BR /&gt;
index=xxx sourcetype=xxx earliest=-15m | search (RequestUri="&lt;EM&gt;shipToAccount&lt;/EM&gt;" AND RequestUri="&lt;EM&gt;v1&lt;/EM&gt;") |stats count(RequestUri) as TotalCount , first(trace) as TraceID by HttpMethod, RequestUri | dedup TraceID | rex field=RequestUri mode=sed "s/^(\/[^\/]+\/)[^\/]+(\/[^\/]+\/[^\/]+\/)[^\/]+(\/[^\/]+\/)[^\/]+(\/[^\/]+\/)[^\/]+(\/[^\/]+\/)[^\/]+(.&lt;EM&gt;)$/\1&lt;/EM&gt;\2*\3*\4*\5*\6/ s/^(\/[^\/]+\/)[^\/]+(\/[^\/]+\/[^\/]+\/)[^\/]+(\/[^\/]+\/)[^\/]+(\/[^\/]+\/)[^\/]+(.&lt;EM&gt;)$/\1&lt;/EM&gt;\2*\3*\4*\5/ s/^(\/[^\/]+\/)[^\/]+(\/[^\/]+\/[^\/]+\/)[^\/]+(\/[^\/]+\/)[^\/]+(.&lt;EM&gt;)$/\1&lt;/EM&gt;\2*\3*\4/ s/^(\/[^\/]+\/)[^\/]+(.&lt;EM&gt;)$/\1&lt;/EM&gt;\2/" |stats sum(TotalCount) as TotalCount by HttpMethod,RequestUri | table HttpMethod, RequestUri, TotalCount&lt;/P&gt;

&lt;P&gt;I am getting result like this:&lt;BR /&gt;
1./v2/&lt;EM&gt;/shipToAccount/division/&lt;/EM&gt;/customer/&lt;EM&gt;/billTo/&lt;/EM&gt;/shipTo&lt;BR /&gt;
2./v2/&lt;EM&gt;/shipToAccount/division/&lt;/EM&gt;/customer/&lt;EM&gt;/billTo/&lt;/EM&gt;/shipTo/&lt;EM&gt;/webToggles&lt;BR /&gt;
3./v2/&lt;/EM&gt;/shipToAccount/division/&lt;EM&gt;/customer/&lt;/EM&gt;/billTo/&lt;EM&gt;/shipTo/&lt;/EM&gt;/webToggles*&lt;EM&gt;?b64BillTo=AAA%3D&amp;amp;b64ShipTo=AAA%3D&amp;amp;orchestrate=true&lt;/EM&gt;* &lt;BR /&gt;
4./v2/&lt;EM&gt;/shipToAccount/division/&lt;/EM&gt;/customer/&lt;EM&gt;/billTo/&lt;/EM&gt;/shipTo/&lt;EM&gt;/webToggles&lt;/EM&gt;&lt;EM&gt;?b64BillTo=MDAwODA4&amp;amp;b64ShipTo=VE9UQUwgTUdNVCBSRVM%3D&amp;amp;orchestrate=true&lt;/EM&gt;* &lt;BR /&gt;
5./v2/&lt;EM&gt;/shipToAccount/division/&lt;/EM&gt;/customer/&lt;EM&gt;/billTo/&lt;/EM&gt;/shipTo*&lt;EM&gt;?shipTo=%40B37242&lt;/EM&gt;* &lt;BR /&gt;
6./v2/&lt;EM&gt;/shipToAccount/division/&lt;/EM&gt;/customer/&lt;EM&gt;/billTo/&lt;/EM&gt;/copyFrom*&lt;EM&gt;?sub=158479860&amp;amp;b64BillTo=QEI4MDYwOA%3D%3D&amp;amp;channel=web-ele-app-user&amp;amp;title=ShipToInformation&lt;/EM&gt;* &lt;/P&gt;

&lt;P&gt;For each segment I would want to strip values at end of URL starting from '?' (in Bold). I tried creating regex on URL field but it is messing up other values.Feels like I am close but need your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:23:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492901#M137474</guid>
      <dc:creator>sameena822</dc:creator>
      <dc:date>2020-09-30T04:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get total count of endpoints based on ClientID?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492902#M137475</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="YourIndexHere" AND sourcetype="xx" AND "/v1/{*}/billToAccount/division/{*}/customer/{*}/billTo"
| rex "^[^\]\n]*\]\s+\-\s+\w+\s+(?P[^,]+)" 
| stats count(Endpoint) AS TotalCount BY clientID Endpoint
| rename clientID as Consumer 
| sort 0 -TotalCount 
| addcoltotals
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Mar 2020 04:20:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-total-count-of-endpoints-based-on-ClientID/m-p/492902#M137475</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-04T04:20:42Z</dc:date>
    </item>
  </channel>
</rss>

