<?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: Extract ip address from result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687151#M234372</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/80737"&gt;@inventsekar&lt;/a&gt;&amp;nbsp;This works only for the ip address 1.2.3.4. What do I do if the ip address changes to 5.6.7.8 or 4.3.2.1?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2024 11:43:28 GMT</pubDate>
    <dc:creator>nsiva</dc:creator>
    <dc:date>2024-05-10T11:43:28Z</dc:date>
    <item>
      <title>Extract ip address from result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687085#M234343</link>
      <description>&lt;P&gt;my output in splunk is as below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;error code #&amp;gt; IP Address is x.y.z.a&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to extract only the x.y.z.a and its count. Should ignore duplicates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please assist?&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 18:49:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687085#M234343</guid>
      <dc:creator>nsiva</dc:creator>
      <dc:date>2024-05-09T18:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extract ip address from result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687086#M234344</link>
      <description>&lt;P&gt;Please see this previous post:&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-extract-ip-address-using-regex/m-p/379717" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-extract-ip-address-using-regex/m-p/379717&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 18:57:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687086#M234344</guid>
      <dc:creator>nyc_jason</dc:creator>
      <dc:date>2024-05-09T18:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Extract ip address from result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687088#M234345</link>
      <description>&lt;P&gt;I did look at that but couldn’t comprehend it to my need. Hence, posted this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 19:12:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687088#M234345</guid>
      <dc:creator>nsiva</dc:creator>
      <dc:date>2024-05-09T19:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extract ip address from result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687091#M234347</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/267764"&gt;@nsiva&lt;/a&gt;&amp;nbsp;Please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw = "123 IP Address is 1.2.3.4"
| rex field=_raw "is\s(?P&amp;lt;ip&amp;gt;.*)" | table _raw ip&lt;/LI-CODE&gt;&lt;P&gt;once if the rex is working fine, then you can do,&lt;BR /&gt;"|stats count by ip"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let us know what happens, thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 19:16:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687091#M234347</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2024-05-09T19:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extract ip address from result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687151#M234372</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/80737"&gt;@inventsekar&lt;/a&gt;&amp;nbsp;This works only for the ip address 1.2.3.4. What do I do if the ip address changes to 5.6.7.8 or 4.3.2.1?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 11:43:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687151#M234372</guid>
      <dc:creator>nsiva</dc:creator>
      <dc:date>2024-05-10T11:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Extract ip address from result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687157#M234374</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/267764"&gt;@nsiva&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The query that&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/80737"&gt;@inventsekar&lt;/a&gt;&amp;nbsp;has posted will work with any of the ip address provided the raw event is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;123 IP Address is 1.2.3.4&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Can you please elaborate why the solution doesn't work for you?&amp;nbsp;&lt;/P&gt;&lt;P&gt;And for your reference, I've used 4.3.2.1 in _raw and it still extracts the ip address. Find the below screenshot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tej57_0-1715344085679.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/30766i22D7B3751C2A9A0E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tej57_0-1715344085679.png" alt="tej57_0-1715344085679.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To assist you better, it would be great if you can provide the raw events and then ip field can be extracted from the same. You can redact the sensitive information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Tejas.&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 12:29:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687157#M234374</guid>
      <dc:creator>tej57</dc:creator>
      <dc:date>2024-05-10T12:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Extract ip address from result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687159#M234375</link>
      <description>&lt;LI-CODE lang="markup"&gt;#your base search which produce the logs, ... like index=abc sourcetype=abc

index=firewall sourcetype=abc
| rex field=_raw "is\s(?P&amp;lt;ip&amp;gt;.*)" 
| table _raw ip
| stats count by ip&lt;/LI-CODE&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/267764"&gt;@nsiva&lt;/a&gt;&amp;nbsp;..&amp;nbsp;&lt;/P&gt;&lt;P&gt;if this search does not work, pls show us a screenshot.. thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 12:47:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-ip-address-from-result/m-p/687159#M234375</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2024-05-10T12:47:03Z</dc:date>
    </item>
  </channel>
</rss>

