<?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 for url fields that only contain IP address in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297693#M89831</link>
    <description>&lt;P&gt;Try these to see if they perform any better. Since you're filter is regex driven, it can't be easily include in base/main search which will make it faster.&lt;/P&gt;

&lt;P&gt;not so much hope on being faster&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar | where match(url,"(\d{1,3}\.}{3}\d{1,3})")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR dirty workaround&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar [| gentimes start=-1 | eval p=mvrange(1,10) | table p | mvexpand p | eval q=mvrange(0,10)  | mvexpand q | eval r=mvrange(0,10)  | mvexpand r | eval s=mvrange(0,10)  | mvexpand s | eval url="*".p."*.".q."*.".r."*.".s."*" | table url]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 06 Jul 2017 21:30:28 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-07-06T21:30:28Z</dc:date>
    <item>
      <title>How to search for url fields that only contain IP address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297689#M89827</link>
      <description>&lt;P&gt;I'm trying to do a search that will show me only IP address for the field url,&lt;/P&gt;

&lt;P&gt;example = sourcetype=fakename url=(only field that has IP address in it 1.1.1.1 or 1.1.1.1/index) &lt;/P&gt;

&lt;P&gt;Do you know what i can use for the url field that will only give me ip address?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 16:36:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297689#M89827</guid>
      <dc:creator>mrtolu6</dc:creator>
      <dc:date>2017-07-06T16:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for url fields that only contain IP address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297690#M89828</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar | regex url=".+(\d{1,3}\.}{3}\d{1,3}).*"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Jul 2017 16:39:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297690#M89828</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-07-06T16:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for url fields that only contain IP address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297691#M89829</link>
      <description>&lt;P&gt;Note - This solution answers the question in the title - what will eliminate all records that do not have an IP somewhere in the url field.  I'm not absolutely sure that's what the OP is asking, but I'm not sure it's not.&lt;/P&gt;

&lt;P&gt;@mrtolu6 - If you only want url values that START with an IP, like your examples, then replace the &lt;CODE&gt;.+&lt;/CODE&gt; with &lt;CODE&gt;^&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 17:43:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297691#M89829</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-07-06T17:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for url fields that only contain IP address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297692#M89830</link>
      <description>&lt;P&gt;This, seems to run slow when i run this, do you know another search i can run to get the IP addressw&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 20:01:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297692#M89830</guid>
      <dc:creator>mrtolu6</dc:creator>
      <dc:date>2017-07-06T20:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for url fields that only contain IP address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297693#M89831</link>
      <description>&lt;P&gt;Try these to see if they perform any better. Since you're filter is regex driven, it can't be easily include in base/main search which will make it faster.&lt;/P&gt;

&lt;P&gt;not so much hope on being faster&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar | where match(url,"(\d{1,3}\.}{3}\d{1,3})")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR dirty workaround&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar [| gentimes start=-1 | eval p=mvrange(1,10) | table p | mvexpand p | eval q=mvrange(0,10)  | mvexpand q | eval r=mvrange(0,10)  | mvexpand r | eval s=mvrange(0,10)  | mvexpand s | eval url="*".p."*.".q."*.".r."*.".s."*" | table url]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Jul 2017 21:30:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297693#M89831</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-07-06T21:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for url fields that only contain IP address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297694#M89832</link>
      <description>&lt;P&gt;none of these seems to work.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 12:54:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/297694#M89832</guid>
      <dc:creator>mrtolu6</dc:creator>
      <dc:date>2017-07-10T12:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for url fields that only contain IP address</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/519789#M146385</link>
      <description>&lt;P&gt;This will output only things where the url looks like an ip address.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=fakename | where match(url, "^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 15 Sep 2020 20:49:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-url-fields-that-only-contain-IP-address/m-p/519789#M146385</guid>
      <dc:creator>automayt</dc:creator>
      <dc:date>2020-09-15T20:49:57Z</dc:date>
    </item>
  </channel>
</rss>

