<?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  group and visualize 2 versions of same host name in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497626#M138601</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xxx_com_app client_ip="64.233." OR client_ip="66.102." OR client_ip="66.249." OR client_ip="72.14." OR client_ip="74.125." OR client_ip="209.85." OR client_ip="216.239." AND (user_agent="Googlebot-Image/1.0" OR user_agent="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" OR user_agent="Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/ Safari/537.36" OR user_agent="Googlebot/2.1 (+http://www.google.com/bot.html)" OR user_agent = "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" host_name="www.xxx.com") uri_path=/store/xxx/* 
|rex field=uri_path "\/store\/(?P&amp;lt;region&amp;gt;[^\/]+)"
| timechart span=1d count by region
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 29 Jan 2020 13:58:32 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2020-01-29T13:58:32Z</dc:date>
    <item>
      <title>How to  group and visualize 2 versions of same host name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497624#M138599</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Currently, I'm trying to find a way to extract the URL from this search, basically, our store has 2 versions Global /en and China /zh and grouping together all the urls of the products with each version (EN and ZH), I would like to base on this query getting the Google hits to our Store split by version since the host_name is the same I cannot find a way to do it&lt;/P&gt;

&lt;P&gt;With this expression uri_path=/store/xxx/*    I'm able to get all the URLs but then I cannot find a way to group them into 2 categories EN and ZH&lt;/P&gt;

&lt;P&gt;Can anyone give me some tips?&lt;/P&gt;

&lt;P&gt;Thanks a lot in advance&lt;/P&gt;

&lt;P&gt;index=xxx_com_app client_ip="64.233.&lt;EM&gt;" OR client_ip="66.102.&lt;/EM&gt;" OR client_ip="66.249.&lt;EM&gt;" OR client_ip="72.14.&lt;/EM&gt;" OR client_ip="74.125.&lt;EM&gt;" OR client_ip="209.85.&lt;/EM&gt;" OR client_ip="216.239.&lt;EM&gt;" AND (user_agent="Googlebot-Image/1.0" OR user_agent="Mozilla/5.0 (compatible; Googlebot/2.1; +&lt;A href="http://www.google.com/bot.html)" target="_blank"&gt;http://www.google.com/bot.html)&lt;/A&gt;" OR user_agent="Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +&lt;A href="http://www.google.com/bot.html" target="_blank"&gt;http://www.google.com/bot.html&lt;/A&gt;) Chrome/&lt;/EM&gt; Safari/537.36" OR user_agent="Googlebot/2.1 (+&lt;A href="http://www.google.com/bot.html)" target="_blank"&gt;http://www.google.com/bot.html)&lt;/A&gt;" OR user_agent = "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/* Mobile Safari/537.36 (compatible; Googlebot/2.1; +&lt;A href="http://www.google.com/bot.html)" target="_blank"&gt;http://www.google.com/bot.html)&lt;/A&gt;" host_name="&lt;A href="http://www.xxx.com%22" target="_blank"&gt;www.xxx.com"&lt;/A&gt;)  uri_path=&lt;EM&gt;/store/xxx/&lt;/EM&gt; | timechart span=1d count by uri_path limit=2&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:56:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497624#M138599</guid>
      <dc:creator>andreshuexes</dc:creator>
      <dc:date>2020-09-30T03:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to  group and visualize 2 versions of same host name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497625#M138600</link>
      <description>&lt;P&gt;Please share some sample data, both /en and /zh, if possible.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 13:56:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497625#M138600</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-01-29T13:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to  group and visualize 2 versions of same host name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497626#M138601</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xxx_com_app client_ip="64.233." OR client_ip="66.102." OR client_ip="66.249." OR client_ip="72.14." OR client_ip="74.125." OR client_ip="209.85." OR client_ip="216.239." AND (user_agent="Googlebot-Image/1.0" OR user_agent="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" OR user_agent="Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/ Safari/537.36" OR user_agent="Googlebot/2.1 (+http://www.google.com/bot.html)" OR user_agent = "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" host_name="www.xxx.com") uri_path=/store/xxx/* 
|rex field=uri_path "\/store\/(?P&amp;lt;region&amp;gt;[^\/]+)"
| timechart span=1d count by region
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jan 2020 13:58:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497626#M138601</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-01-29T13:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to  group and visualize 2 versions of same host name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497627#M138602</link>
      <description>&lt;P&gt;Hi @andreshuexes,&lt;BR /&gt;
could you share two examples of your logs with &lt;CODE&gt;/en&lt;/CODE&gt; and &lt;CODE&gt;/zh&lt;/CODE&gt; ?&lt;BR /&gt;
Them please, correct your answer using Code Sample button, because now it isn't possible to correctly read your search.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 14:00:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497627#M138602</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-01-29T14:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to  group and visualize 2 versions of same host name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497628#M138603</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Sure, &lt;/P&gt;

&lt;P&gt;We have a store with all the products in both versions, ideally, we would like to get the Googlebot hits to each of the English and China URLs separated&lt;/P&gt;

&lt;P&gt;Here you have an example of a URL, the only difference is the EN or ZH&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.xxx.com/store/yyy/en/p/product/?p=qwerty"&gt;https://www.xxx.com/store/yyy/en/p/product/?p=qwerty&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://www.xxx.com/store/yyy/zh/p/product/?p=qwerty"&gt;https://www.xxx.com/store/yyy/zh/p/product/?p=qwerty&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks &lt;BR /&gt;
Andres&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 10:59:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497628#M138603</guid>
      <dc:creator>andreshuexes</dc:creator>
      <dc:date>2020-01-30T10:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to  group and visualize 2 versions of same host name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497629#M138604</link>
      <description>&lt;P&gt;Hello Giuseppe,&lt;/P&gt;

&lt;P&gt;Sure, &lt;/P&gt;

&lt;P&gt;We have a store with all the products in both versions, ideally, we would like to get the Googlebot hits to each of the English and China URLs separated&lt;/P&gt;

&lt;P&gt;Here you have an example of a URL, the only difference is the EN or ZH&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.xxx.com/store/yyy/en/p/product/?p=qwerty"&gt;https://www.xxx.com/store/yyy/en/p/product/?p=qwerty&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://www.xxx.com/store/yyy/zh/p/product/?p=qwerty"&gt;https://www.xxx.com/store/yyy/zh/p/product/?p=qwerty&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks &lt;BR /&gt;
Andres&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 10:59:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497629#M138604</guid>
      <dc:creator>andreshuexes</dc:creator>
      <dc:date>2020-01-30T10:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to  group and visualize 2 versions of same host name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497630#M138605</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;Thanks for the reply,&lt;/P&gt;

&lt;P&gt;I cannot make it work&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 11:00:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497630#M138605</guid>
      <dc:creator>andreshuexes</dc:creator>
      <dc:date>2020-01-30T11:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to  group and visualize 2 versions of same host name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497631#M138606</link>
      <description>&lt;P&gt;Did you modify the xxx in the above to suit your needs? &lt;/P&gt;

&lt;P&gt;You probably want to set the uri to &lt;CODE&gt;”*store/*”&lt;/CODE&gt;and host_name to something sensible&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 11:05:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497631#M138606</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-01-30T11:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to  group and visualize 2 versions of same host name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497632#M138607</link>
      <description>&lt;P&gt;Hi @andreshuexes,&lt;BR /&gt;
you can use your search to extract results, and from these results extract the region.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xxx_com_app 
(client_ip="64.233." OR client_ip="66.102." OR client_ip="66.249." OR client_ip="72.14." OR client_ip="74.125." OR client_ip="209.85." OR client_ip="216.239." )
(user_agent="Googlebot-Image/1.0" OR user_agent="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" OR user_agent="Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/ Safari/537.36" OR user_agent="Googlebot/2.1 (+http://www.google.com/bot.html)" OR user_agent = "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)") host_name="www.xxx.com") uri_path=/store/xxx/* 
| eval region=if(like(url,"%en%"),"Global","China")
| timechart span=1d count by region
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you can have more regions than Global and China, you can use case instead of if in the eval statement or a regex to extract the region.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 12:54:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-visualize-2-versions-of-same-host-name/m-p/497632#M138607</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-01-30T12:54:55Z</dc:date>
    </item>
  </channel>
</rss>

