<?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: Get count from multiple urls based on required properties in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392878#M114280</link>
    <description>&lt;P&gt;The field you are looking for seems to be in different places in the URLs.  What determines the where the field is located?&lt;/P&gt;</description>
    <pubDate>Wed, 16 May 2018 14:47:21 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2018-05-16T14:47:21Z</dc:date>
    <item>
      <title>Get count from multiple urls based on required properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392877#M114279</link>
      <description>&lt;P&gt;I am having below content with different (4 sets)urls presented in my logs, having  index="abc_uyt"&lt;/P&gt;

&lt;P&gt;RuntimeException having &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/ronaldo/getbilledvspaid/v1"&gt;https://google.yahoo.com/web/kiran/cart/groups/ronaldo/getbilledvspaid/v1&lt;/A&gt;&lt;BR /&gt;
RuntimeException having &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/ronaldo/paymenthistory/v1"&gt;https://google.yahoo.com/web/kiran/cart/groups/ronaldo/paymenthistory/v1&lt;/A&gt;&lt;BR /&gt;
RuntimeException having &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/ronaldo/requesthistory/v1"&gt;https://google.yahoo.com/web/kiran/cart/groups/ronaldo/requesthistory/v1&lt;/A&gt;&lt;BR /&gt;
RuntimeException having &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/ronaldo/runninghistory/v1"&gt;https://google.yahoo.com/web/kiran/cart/groups/ronaldo/runninghistory/v1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;RuntimeException having  &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/watson/invoicedetail/v1"&gt;https://google.yahoo.com/web/kiran/cart/groups/watson/invoicedetail/v1&lt;/A&gt;&lt;BR /&gt;
RuntimeException having &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/watson/invoicesummary/v1"&gt;https://google.yahoo.com/web/kiran/cart/groups/watson/invoicesummary/v1&lt;/A&gt;&lt;BR /&gt;
RuntimeException having &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/watson/gettingValue/v1"&gt;https://google.yahoo.com/web/kiran/cart/groups/watson/gettingValue/v1&lt;/A&gt;&lt;BR /&gt;
RuntimeException having &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/watson/historyValue/v1"&gt;https://google.yahoo.com/web/kiran/cart/groups/watson/historyValue/v1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;RuntimeException having &lt;A href="https://microsoft.word.com/ringert/rkj3/obama/funatwork"&gt;https://microsoft.word.com/ringert/rkj3/obama/funatwork&lt;/A&gt;&lt;BR /&gt;
RuntimeException having &lt;A href="https://microsoft.word.com/ringert/rkj3/obama/runathome"&gt;https://microsoft.word.com/ringert/rkj3/obama/runathome&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;RuntimeException having &lt;A href="https://cisco-services.raj.com/ytr-services/gilchrist/vision"&gt;https://cisco-services.raj.com/ytr-services/gilchrist/vision&lt;/A&gt;&lt;BR /&gt;
RuntimeException having &lt;A href="https://cisco-services.raj.com/ytr-services/gilchrist/health"&gt;https://cisco-services.raj.com/ytr-services/gilchrist/health&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;and i want to get the count based on &lt;STRONG&gt;ronaldo&lt;/STRONG&gt;, &lt;STRONG&gt;watson&lt;/STRONG&gt;, &lt;STRONG&gt;obama&lt;/STRONG&gt;, &lt;STRONG&gt;gilchrist&lt;/STRONG&gt; with appropriate values also as tabular form like below&lt;BR /&gt;
ronaldo - 25&lt;BR /&gt;
watson - 22&lt;BR /&gt;
obama - 36&lt;BR /&gt;
gilchrist - 21 &lt;/P&gt;

&lt;P&gt;Could any one please assist, i have tried with rex, sed, count.. but getting unexpected count&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 13:22:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392877#M114279</guid>
      <dc:creator>arjun_krishna</dc:creator>
      <dc:date>2018-05-16T13:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple urls based on required properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392878#M114280</link>
      <description>&lt;P&gt;The field you are looking for seems to be in different places in the URLs.  What determines the where the field is located?&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 14:47:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392878#M114280</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-05-16T14:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple urls based on required properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392879#M114281</link>
      <description>&lt;P&gt;For the first set, will the URLs always ends with v1 ?&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 14:50:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392879#M114281</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-16T14:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple urls based on required properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392880#M114282</link>
      <description>&lt;P&gt;If the URLs will always end with either &lt;CODE&gt;/something&lt;/CODE&gt; OR &lt;CODE&gt;/something/v1&lt;/CODE&gt; (where the "v1" will literally always be "v1" and not anything else), then this should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "(?&amp;lt;name&amp;gt;\w+)\/\w+(\/v1)?$"
| stats count by name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 May 2018 14:59:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392880#M114282</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-05-16T14:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple urls based on required properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392881#M114283</link>
      <description>&lt;P&gt;Alternately, if you have a finite list of names you're looking for, you could create a wildcard lookup containing those names. Here's a good answer that explains how to do that:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/52580/can-we-use-wildcard-characters-in-a-lookup-table.html"&gt;https://answers.splunk.com/answers/52580/can-we-use-wildcard-characters-in-a-lookup-table.html&lt;/A&gt;&lt;BR /&gt;
I'll assume you load those in such that you wind up with something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user, username
*ronaldo*, ronaldo
*watson*, watson
*obama*, obama
*gilchrist*, gilchrist
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Once you have the names loaded into your wildcard lookup, you would do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search where the URLs are in a field called URL
| lookup your_wildcard_lookup user AS URL OUTPUT username
| stats count by username
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 May 2018 15:12:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392881#M114283</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-05-16T15:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple urls based on required properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392882#M114284</link>
      <description>&lt;P&gt;No, they are not end with v1, rather than i have to depend on the url domains&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 17:39:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392882#M114284</guid>
      <dc:creator>arjun_krishna</dc:creator>
      <dc:date>2018-05-16T17:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple urls based on required properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392883#M114285</link>
      <description>&lt;P&gt;If the URL domains are fixed, you try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="abc_uyt"
| rex field=UrlFieldName "https:\/\/(google([^\/]+\/){5}|microsoft([^\/]+\/){3}|cisco([^\/]+\/){2})(?&amp;lt;name&amp;gt;[^\/]+)"
| stats count by name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See the regex working with your sample data here: &lt;A href="https://regex101.com/r/t8coTo/1"&gt;https://regex101.com/r/t8coTo/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 18:16:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392883#M114285</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-16T18:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple urls based on required properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392884#M114286</link>
      <description>&lt;P&gt;logs are comes like below sets log1, log2, log3 , log4, log5, log6&lt;BR /&gt;
log1: Caused by: java.RuntimeException having &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/ronaldo/getbilledvspaid/v1:"&gt;https://google.yahoo.com/web/kiran/cart/groups/ronaldo/getbilledvspaid/v1:&lt;/A&gt; Read timed out&lt;/P&gt;

&lt;P&gt;log2: Caused by: java.RuntimeException having &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/ronaldo/saysfs/v1:"&gt;https://google.yahoo.com/web/kiran/cart/groups/ronaldo/saysfs/v1:&lt;/A&gt; Read timed out&lt;/P&gt;

&lt;P&gt;log3: Caused by: java.RuntimeException having &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/watson/invoicesummary/v1:"&gt;https://google.yahoo.com/web/kiran/cart/groups/watson/invoicesummary/v1:&lt;/A&gt; Read timed out&lt;/P&gt;

&lt;P&gt;log4: Caused by: java.RuntimeException having &lt;A href="https://google.yahoo.com/web/kiran/cart/groups/watson/iuaxaddd/v1:"&gt;https://google.yahoo.com/web/kiran/cart/groups/watson/iuaxaddd/v1:&lt;/A&gt; Read timed out&lt;/P&gt;

&lt;P&gt;log5: KHGM PDF invoice service at endpoint: &lt;A href="https://microsoft.word.com/ringert/rkj3/obama/funatwork"&gt;https://microsoft.word.com/ringert/rkj3/obama/funatwork&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;log6: and setting service endpoint URL: &lt;A href="https://cisco-services.raj.com/ytr-services/gilchrist/health"&gt;https://cisco-services.raj.com/ytr-services/gilchrist/health&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 18:18:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392884#M114286</guid>
      <dc:creator>arjun_krishna</dc:creator>
      <dc:date>2018-05-16T18:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple urls based on required properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392885#M114287</link>
      <description>&lt;P&gt;can you please consider above scenario ? please the syntax is almost correct not getting name based count&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 18:35:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392885#M114287</guid>
      <dc:creator>arjun_krishna</dc:creator>
      <dc:date>2018-05-16T18:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple urls based on required properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392886#M114288</link>
      <description>&lt;P&gt;Above regex works with your new data samples as well. &lt;A href="https://regex101.com/r/BCtKTw/1"&gt;https://regex101.com/r/BCtKTw/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In my query, I'm assuming there is a URL field which contains these logs or the URL portion of it. If there is no such field and you're searching though your whole log entry or _raw field, just remove field=UrlFieldName from above query.&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 18:41:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392886#M114288</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-16T18:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple urls based on required properties</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392887#M114289</link>
      <description>&lt;P&gt;Thanks, its worked&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 09:27:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-count-from-multiple-urls-based-on-required-properties/m-p/392887#M114289</guid>
      <dc:creator>arjun_krishna</dc:creator>
      <dc:date>2018-05-17T09:27:11Z</dc:date>
    </item>
  </channel>
</rss>

