<?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: In a search, how do you group similar URL patterns? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398642#M167280</link>
    <description>&lt;P&gt;So I recommend creating a new field which normalizes the request uris. Also you don't need a separate search apache_responsetime=*. Just combine it. The default is to AND the searches.&lt;/P&gt;

&lt;P&gt;It is not clear what the space of your URLs is. If you want to lump all Food and all Home life style pages together then maybe something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype=apache:access request_uri="\*/c/\*"  apache_responsetime=* | rex field=request_uri "//(?&amp;lt;category&amp;gt;\S+)/" | chart perc90(apache_responsetime) by category
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 03 Oct 2018 19:51:15 GMT</pubDate>
    <dc:creator>burwell</dc:creator>
    <dc:date>2018-10-03T19:51:15Z</dc:date>
    <item>
      <title>In a search, how do you group similar URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398637#M167275</link>
      <description>&lt;P&gt;I am doing a search and evaluating count, avg RT based on some URL patterns. Below are the URLs for my category pages :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;//Food/Back-to-School/Breakfast/Breakfast-Bars/c/1015001004
//Food/Back-to-School/Breakfast/Cereal/c/1015001001
//Home-%26-Lifestyle/Beauty/Cosmetics/Eyes/c/2004001001
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Using below query gives me the different results for different URLs, but I want results grouped into 1 Relative URL.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=apache:access request_uri="\*/c/\*"  |  search apache_responsetime=* | chart perc90(apache_responsetime) over request_uri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What query I should use to get desired results?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 14:29:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398637#M167275</guid>
      <dc:creator>alex129</dc:creator>
      <dc:date>2018-10-03T14:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: In a search, how do you group similar URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398638#M167276</link>
      <description>&lt;P&gt;@alex129, Can you explain with example what do you mean by similar url?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 18:30:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398638#M167276</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2018-10-03T18:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: In a search, how do you group similar URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398639#M167277</link>
      <description>&lt;P&gt;@VatsalJagani , the URLs mentioned in my questions are for category page &amp;amp; can be searched as requesturi="&lt;EM&gt;/c/&lt;/EM&gt;"&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 18:48:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398639#M167277</guid>
      <dc:creator>alex129</dc:creator>
      <dc:date>2018-10-03T18:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: In a search, how do you group similar URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398640#M167278</link>
      <description>&lt;P&gt;So if they have /c/ they are the same? What are other url patterns?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 19:34:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398640#M167278</guid>
      <dc:creator>burwell</dc:creator>
      <dc:date>2018-10-03T19:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: In a search, how do you group similar URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398641#M167279</link>
      <description>&lt;P&gt;Since  you're looking at only specific type of URIs (only one  pattern), you can simply do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=apache:access request_uri="\*/c/\*"  apache_responsetime=* 
| stats perc90(apache_responsetime)  | eval request_uri="*/c/*" | table requiest_uri perc90(apache_responsetime)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;A more generic approach would be this (where you can look for multiple URI patterns)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=apache:access (request_uri="\*/a/\*" OR   request_uri="\*/b/\*" OR...other patterns ) apache_responsetime=* 
| eval request_uri=case(searchmatch(request_uri="\*/a/\*"),"*/a/*", request_uri="\*/b/\*"),"*/b/*",..literal/static values for other patterns..)
| chart perc90(apache_responsetime) over request_uri
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Oct 2018 19:44:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398641#M167279</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-10-03T19:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: In a search, how do you group similar URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398642#M167280</link>
      <description>&lt;P&gt;So I recommend creating a new field which normalizes the request uris. Also you don't need a separate search apache_responsetime=*. Just combine it. The default is to AND the searches.&lt;/P&gt;

&lt;P&gt;It is not clear what the space of your URLs is. If you want to lump all Food and all Home life style pages together then maybe something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype=apache:access request_uri="\*/c/\*"  apache_responsetime=* | rex field=request_uri "//(?&amp;lt;category&amp;gt;\S+)/" | chart perc90(apache_responsetime) by category
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Oct 2018 19:51:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398642#M167280</guid>
      <dc:creator>burwell</dc:creator>
      <dc:date>2018-10-03T19:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: In a search, how do you group similar URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398643#M167281</link>
      <description>&lt;P&gt;@burwell &lt;BR /&gt;
I mean "/c/" is common in all category URLs and I need to group all these URLs so  that I can get count, response time etc. for grouped URL&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 19:52:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398643#M167281</guid>
      <dc:creator>alex129</dc:creator>
      <dc:date>2018-10-03T19:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: In a search, how do you group similar URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398644#M167282</link>
      <description>&lt;P&gt;@somesoni2 , &lt;/P&gt;

&lt;P&gt;Your 1st query, I am getting the results for 90th percentile in 1 column, But &lt;BR /&gt;
1. Not getting chart over time for grouped URL&lt;BR /&gt;
2. how to get stats count for all these URLs&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 20:18:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398644#M167282</guid>
      <dc:creator>alex129</dc:creator>
      <dc:date>2018-10-03T20:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: In a search, how do you group similar URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398645#M167283</link>
      <description>&lt;P&gt;@burwell &lt;/P&gt;

&lt;P&gt;Your query is grouping all URLs post '/c/' i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/Food/Back-to-School/Breakfast/Breakfast-Bars/c/1015001001
/Food/Back-to-School/Breakfast/Breakfast-Bars/c/1015001002
/Food/Back-to-School/Breakfast/Breakfast-Bars/c/1015001003

into 

/Food/Back-to-School/Breakfast/Breakfast-Bars/c/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need all URLs before /c/ as well to group into 1 URL&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 20:20:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-a-search-how-do-you-group-similar-URL-patterns/m-p/398645#M167283</guid>
      <dc:creator>alex129</dc:creator>
      <dc:date>2018-10-03T20:20:06Z</dc:date>
    </item>
  </channel>
</rss>

