<?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 replace the similar uri_paths in a Splunk search to calculate the response time for each endpoint? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220737#M64854</link>
    <description>&lt;P&gt;@greeshmak try my updated answer. If that does work, please share desired output and an example of what you call "endpoint"&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2016 22:03:24 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-08-11T22:03:24Z</dc:date>
    <item>
      <title>How to replace the similar uri_paths in a Splunk search to calculate the response time for each endpoint?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220731#M64848</link>
      <description>&lt;P&gt;Example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;application="example" index=web uri_path="/some/example/*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In my application, I have similar uri_paths. I want to replace uri_path and calculate the response time for each endpoint.&lt;/P&gt;

&lt;P&gt;Uri_paths: I have 4 different uri_paths, each one of uri_path has different number on the end, that number are nothing but a uniqu generated number for each request. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/com/google/example/request/123456788000


/com/google/example/request/98760456098
  /com/google/example/request/4521346098
/com/google/example/request/6983256709
/com/google/example/request/45321670987
/com/google/example/request/9834708641

 /com/google/example/request/bulk/12345678090
/com/google/example/request/bulk/6521340976
/com/google/example/request/bulk/5679084124
/com/google/example/request/bulk/428429720
/com/google/example/request/bulk/7267311890
/com/google/example/request/bulk/254102157

 /com/google/example/request/different/12345668900
/com/google/example/request/different/6358097421
/com/google/example/request/different/0789043267
/com/google/example/request/different/67562463129
/com/google/example/request/different/0737912913243


 /com/google/example/request/12345677/12345770
/com/google/example/request/126938710/2397100701
/com/google/example/request/625197012804/77064261381
/com/google/example/request/26912783-12/07129512
/com/google/example/request/6877207401/09737861
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So i would like to consider the each end point into one uri_path and want to caliculate the response time of that uri_path. In this way, i ll get to know, how long each endpoint is taking to complete the process.&lt;/P&gt;

&lt;P&gt;How to replace above similar uri_path into separate uri_path to calculate the response time of each endpoint?&lt;/P&gt;

&lt;P&gt;I have replaced some uri_paths using replace command, for above request it is not working.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:34:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220731#M64848</guid>
      <dc:creator>greeshmak</dc:creator>
      <dc:date>2020-09-29T10:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace the similar uri_paths in a Splunk search to calculate the response time for each endpoint?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220732#M64849</link>
      <description>&lt;P&gt;Can you give an example of how the replaced value might look?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 21:58:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220732#M64849</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-09T21:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace the similar uri_paths in a Splunk search to calculate the response time for each endpoint?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220733#M64850</link>
      <description>&lt;P&gt;This will give you the last two segments of uri_path&lt;BR /&gt;
*&lt;STRONG&gt;&lt;EM&gt;UPDATED&lt;/EM&gt;&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=uri_path "(?&amp;lt;endpoint&amp;gt;.+?)/[\d/]+$" | stats earliest(_time) as start latest(_time) as end by endpoint | eval duration=tostring(round(end-start, 0), "duration")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2016 22:02:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220733#M64850</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-09T22:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace the similar uri_paths in a Splunk search to calculate the response time for each endpoint?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220734#M64851</link>
      <description>&lt;P&gt;I'm replacing the uri_path by using the replace command.&lt;/P&gt;

&lt;P&gt;Ex: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;application="example" index="web" uri_path="/some/example/*"| replace "/com/google/example/request/*" WITH "/com/google/example/request/{ID}" in uri_path|replace "/com/google/example/request/bulk/*" with "/com/google/example/request/bulk/{Id}" in uri_path| replace "/com/google/example/request/different/*" with "/com/google/example/request/different/{Id}" in uri_path| replace " /com/google/example/request/*/*" with " /com/google/example/request/{Id1}/{Id2}"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Results are only showing the &lt;CODE&gt;"/com/google/example/request/*"&lt;/CODE&gt; end point since I'm using the &lt;CODE&gt;*&lt;/CODE&gt; after request.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 22:23:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220734#M64851</guid>
      <dc:creator>greeshmak</dc:creator>
      <dc:date>2016-08-09T22:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace the similar uri_paths in a Splunk search to calculate the response time for each endpoint?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220735#M64852</link>
      <description>&lt;P&gt;Instead of &lt;CODE&gt;replace&lt;/CODE&gt;, try &lt;CODE&gt;rex&lt;/CODE&gt;. Here is an example. I'm unsure where you're getting the {ID} from...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    rex mode=sed field=uri_path "s/(com\/google\/example\/request\/).*/\1{ID}/g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Aug 2016 00:13:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220735#M64852</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-10T00:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace the similar uri_paths in a Splunk search to calculate the response time for each endpoint?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220736#M64853</link>
      <description>&lt;P&gt;Sorry but I'm struggling to understand what you are trying to do.&lt;BR /&gt;
If you just want to get rid of the random number at the end of the uri_path so that you can then group by endpoint, then the following should work. If you please provide some information on the desired output.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=uri_path "(?&amp;lt;endpoint&amp;gt;.+?)/[\d/]+$"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1701i42472FA67E93C982/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
J&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 14:58:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220736#M64853</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-08-10T14:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace the similar uri_paths in a Splunk search to calculate the response time for each endpoint?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220737#M64854</link>
      <description>&lt;P&gt;@greeshmak try my updated answer. If that does work, please share desired output and an example of what you call "endpoint"&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 22:03:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-the-similar-uri-paths-in-a-Splunk-search-to/m-p/220737#M64854</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-11T22:03:24Z</dc:date>
    </item>
  </channel>
</rss>

