<?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 Search Range for Grouped IP in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654987#M226263</link>
    <description>&lt;P&gt;By group field, I assume you are referring to a multi-value field? If so, you could expand your events by the multi-value field so that each part can be evaluated separately&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mvexpand IP&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 21 Aug 2023 05:40:18 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-08-21T05:40:18Z</dc:date>
    <item>
      <title>How to Search Range for Grouped IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654985#M226262</link>
      <description>&lt;LI-SPOILER&gt;&amp;nbsp;&lt;/LI-SPOILER&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created table with host and grouped IP address the host will have public and private IP address&lt;/P&gt;&lt;P&gt;So my table look like this&lt;/P&gt;&lt;P&gt;Host&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; id&lt;/P&gt;&lt;P&gt;Host A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10.1.1.1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;21&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 172.1.1.1&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have ip range to identify the public ip.&lt;/P&gt;&lt;P&gt;i need to create another field which if the range is match mean the result will be yes if not no&lt;/P&gt;&lt;P&gt;i have used this query for the field&amp;nbsp;&lt;/P&gt;&lt;P&gt;| eval "internet facing"=case(cidrmatch(172.1.1.0/24" , IP) , "Yes" , 1=1, "No")&lt;/P&gt;&lt;P&gt;but this eval only work on field which have 1 IP.&lt;/P&gt;&lt;P&gt;in my group ip field, its not working.&lt;/P&gt;&lt;P&gt;Please assist on this.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 04:39:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654985#M226262</guid>
      <dc:creator>Akmal57</dc:creator>
      <dc:date>2023-08-21T04:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Search Range for Grouped IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654987#M226263</link>
      <description>&lt;P&gt;By group field, I assume you are referring to a multi-value field? If so, you could expand your events by the multi-value field so that each part can be evaluated separately&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mvexpand IP&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Aug 2023 05:40:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654987#M226263</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-21T05:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Search Range for Grouped IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654990#M226264</link>
      <description>&lt;P&gt;ok, thank you for you reply. but if using mvexpand, the ip will splited by host.&lt;/P&gt;&lt;P&gt;is there any work around to not split the host?&lt;/P&gt;&lt;P&gt;if i split the ip for example like&lt;/P&gt;&lt;P&gt;host&amp;nbsp; &amp;nbsp;ip1&amp;nbsp; ip2&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there any query that can detect the internet facing by search across all the ip field&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 07:06:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654990#M226264</guid>
      <dc:creator>Akmal57</dc:creator>
      <dc:date>2023-08-21T07:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to Search Range for Grouped IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654991#M226265</link>
      <description>&lt;P&gt;What do you mean split by host? Perhaps if you share what your events actually look like (anonymised of course), we might be able to figure out what it is you are trying to do.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 07:11:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654991#M226265</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-21T07:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Search Range for Grouped IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654992#M226266</link>
      <description>&lt;P&gt;if using mvexpand, my result is like this:&lt;/P&gt;&lt;P&gt;Host&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Internet Facing&lt;/P&gt;&lt;P&gt;Host A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10.1.1.1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;No&lt;/P&gt;&lt;P&gt;Host A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;172. 1.1.1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Yes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for the ip field, i have combined from 2 sources&lt;/P&gt;&lt;P&gt;my table should look like this:&lt;/P&gt;&lt;P&gt;Host&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Internet Facing&amp;nbsp;&lt;/P&gt;&lt;P&gt;Host A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10.1.1.1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Yes&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 172. 1.1.1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my sample query&lt;/P&gt;&lt;P&gt;index=a or sourcetype=b&lt;BR /&gt;|eval ip=mvappend(IP1, IP2)&lt;/P&gt;&lt;P&gt;|stats value(ip) as ip by host&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| eval "internet facing"=case(cidrmatch(172.1.1.0/24" , IP) , "Yes" , 1=1, "No")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need the result to look like the second example table above, which does not splitting the host.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 07:33:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654992#M226266</guid>
      <dc:creator>Akmal57</dc:creator>
      <dc:date>2023-08-21T07:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to Search Range for Grouped IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654993#M226267</link>
      <description>&lt;P&gt;If you already have two fields with the IP addresses, you can compare them prior to the mvappend&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=a or sourcetype=b
| eval "internet facing"=case(cidrmatch(172.1.1.0/24" , IP1) , "Yes" , cidrmatch(172.1.1.0/24" , IP2) , "Yes" , 1==1, "No")
| eval ip=mvappend(IP1, IP2)
| fields - IP1 IP2
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Aug 2023 07:54:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654993#M226267</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-21T07:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to Search Range for Grouped IP</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654996#M226268</link>
      <description>&lt;P&gt;Owh, thank you very much. it work perfectly as needed.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 08:04:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Search-Range-for-Grouped-IP/m-p/654996#M226268</guid>
      <dc:creator>Akmal57</dc:creator>
      <dc:date>2023-08-21T08:04:40Z</dc:date>
    </item>
  </channel>
</rss>

