<?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 similar domain/URL patterns? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-similar-domain-URL-patterns/m-p/583755#M203283</link>
    <description>&lt;P&gt;If you're searching for the literal string&amp;nbsp;"170.51.31.0/22":&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=example source=example_example "170.51.31.0/22"
| stats count by &amp;lt;field_name&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;If you're searching for ip addresses that falls into the CIDR range "170.51.31.0/22"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=example source=example_example
| search cidrmatch("170.51.31.0/22", &amp;lt;dest_ip_field&amp;gt; )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Feb 2022 17:53:45 GMT</pubDate>
    <dc:creator>johnhuang</dc:creator>
    <dc:date>2022-02-04T17:53:45Z</dc:date>
    <item>
      <title>How to group similar domain/URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-similar-domain-URL-patterns/m-p/583644#M203244</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I would like to group URL fields and get a total count.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When&amp;nbsp; I do this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=example source=example_example dest="*.amazonaws.com" OR dest="*.amazoncognito.com" OR dest="slack.com" OR dest="*.docker.io" | dedup dest | table dest | stats count by dest&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the output is this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;dest count&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="369.594px" height="25px"&gt;352532535.abc.def.eu-xxxxx-1.amazonaws.com&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="369.594px" height="25px"&gt;&lt;SPAN&gt;abc.auth.xx-aaaa-1.amazoncognito.com&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;aaa1-stage-login-abcdef.auth.xx-abcd-1.amazoncognito.com&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="369.594px" height="25px"&gt;346345452.abc.def.us-abcd-2.amazonaws.com&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="369.594px" height="25px"&gt;&lt;SPAN&gt;autoscaling.xx-east-4.amazonaws.com&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="369.594px" height="25px"&gt;&lt;SPAN&gt;slack.com&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;registry-1.docker.io&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="369.594px" height="25px"&gt;&lt;SPAN&gt;auth.docker.io&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I wanted to group them by similar patterns like this:&lt;/P&gt;&lt;P&gt;gruopedURL count&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="369.594px" height="25px"&gt;.amazonaws.com&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="369.594px" height="25px"&gt;&lt;SPAN&gt;.amazoncognito.com&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="369.594px" height="25px"&gt;&lt;SPAN&gt;slack.com&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="369.594px" height="25px"&gt;&lt;SPAN&gt;.docker.io&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I've tried other possible queries based on some postings here, but no luck. It was mostly after the '.com'&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 20:23:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-similar-domain-URL-patterns/m-p/583644#M203244</guid>
      <dc:creator>ail321</dc:creator>
      <dc:date>2022-02-03T20:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to group similar domain/URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-similar-domain-URL-patterns/m-p/583654#M203246</link>
      <description>&lt;P&gt;You do way too many things in your search which actually slow it down.&lt;/P&gt;&lt;P&gt;Lose the dedup and lose the table. Just search and stat. That's for starters.&lt;/P&gt;&lt;P&gt;Secondly, use rex to extract the top part of the domain. Then do your stats&lt;/P&gt;&lt;PRE&gt;&amp;lt;base search&amp;gt;&lt;BR /&gt;| rex field=dest "(.*\.)?(?&amp;lt;base&amp;gt;[^.]+\.[^.]+)"&lt;BR /&gt;| stats count by base&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 22:26:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-similar-domain-URL-patterns/m-p/583654#M203246</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-02-03T22:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to group similar domain/URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-similar-domain-URL-patterns/m-p/583659#M203248</link>
      <description>&lt;P&gt;Since you appear to already know what "common" parts of the urls you are interested in since they are part of our search filter, you could just count them&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count(eval(match(dest,"amazonaws\.com"))) as amazonaws.com count(eval(match(dest,"amazoncognito\.com"))) as amazoncognito.com count(eval(match(dest,"slack\.com"))) as slack.com count(eval(match(dest,"docker\.io"))) as docker.io&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 03 Feb 2022 22:52:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-similar-domain-URL-patterns/m-p/583659#M203248</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-02-03T22:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to group similar domain/URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-similar-domain-URL-patterns/m-p/583722#M203274</link>
      <description>&lt;P&gt;this worked. What if I add to search something like this 170.51.31.0/22&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 14:26:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-similar-domain-URL-patterns/m-p/583722#M203274</guid>
      <dc:creator>ail321</dc:creator>
      <dc:date>2022-02-04T14:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to group similar domain/URL patterns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-similar-domain-URL-patterns/m-p/583755#M203283</link>
      <description>&lt;P&gt;If you're searching for the literal string&amp;nbsp;"170.51.31.0/22":&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=example source=example_example "170.51.31.0/22"
| stats count by &amp;lt;field_name&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;If you're searching for ip addresses that falls into the CIDR range "170.51.31.0/22"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=example source=example_example
| search cidrmatch("170.51.31.0/22", &amp;lt;dest_ip_field&amp;gt; )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 17:53:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-similar-domain-URL-patterns/m-p/583755#M203283</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-02-04T17:53:45Z</dc:date>
    </item>
  </channel>
</rss>

