<?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: Split IP Address in network and host part in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347206#M102802</link>
    <description>&lt;P&gt;Are you going to assume that every IP address belongs to a /24 network?  That's not always a valid assumption.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Feb 2018 14:43:52 GMT</pubDate>
    <dc:creator>micahkemp</dc:creator>
    <dc:date>2018-02-06T14:43:52Z</dc:date>
    <item>
      <title>Split IP Address in network and host part</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347203#M102799</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I've got a little problem. I want to split up IP addresses in network and host part (to create a chart for network segments).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;some search | rex field=scrip "(?&amp;lt;Net&amp;gt;.*\..*\.)(?&amp;lt;Host&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the rex part that I got so far. But there are no fields created with "Net" or "Host". What am I doing wrong?&lt;/P&gt;

&lt;P&gt;Thanks for your help!&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Maik&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 09:37:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347203#M102799</guid>
      <dc:creator>MOberschelp</dc:creator>
      <dc:date>2018-02-06T09:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Split IP Address in network and host part</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347204#M102800</link>
      <description>&lt;P&gt;What is the name of the field which contains the IP address? Is it really "scrip"? Perhaps there is a typo and it should be "srcip" or "src_ip".&lt;/P&gt;

&lt;P&gt;I have modified your regex a little. Try it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=src_ip "(?&amp;lt;Net&amp;gt;\d+\.\d+\.\d+)\.(?&amp;lt;Host&amp;gt;\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tested it like this which created a "Net" field and "Host" field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=1 | eval src_ip="192.168.0.1" | rex field=src_ip "(?&amp;lt;Net&amp;gt;\d+\.\d+\.\d+)\.(?&amp;lt;Host&amp;gt;\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Feb 2018 14:17:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347204#M102800</guid>
      <dc:creator>Yunagi</dc:creator>
      <dc:date>2018-02-06T14:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Split IP Address in network and host part</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347205#M102801</link>
      <description>&lt;P&gt;Hey,&lt;BR /&gt;
It seems you have typo in your fieldname ... is your fieldname is &lt;CODE&gt;scrip&lt;/CODE&gt; or &lt;CODE&gt;script&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 14:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347205#M102801</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-06T14:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Split IP Address in network and host part</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347206#M102802</link>
      <description>&lt;P&gt;Are you going to assume that every IP address belongs to a /24 network?  That's not always a valid assumption.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 14:43:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347206#M102802</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-06T14:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Split IP Address in network and host part</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347207#M102803</link>
      <description>&lt;P&gt;Omg! Please ignore this whole question...&lt;BR /&gt;
We've checked it twice but didn't see that I had a typo. Of course the field is srcip and not scrip.&lt;/P&gt;

&lt;P&gt;If I write it in the correct way it works fine... &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thank you for your hint.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Maik&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 15:22:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347207#M102803</guid>
      <dc:creator>MOberschelp</dc:creator>
      <dc:date>2018-02-06T15:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Split IP Address in network and host part</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347208#M102804</link>
      <description>&lt;P&gt;In this case... or for this case the ip address always belongs to class C network.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 15:27:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-IP-Address-in-network-and-host-part/m-p/347208#M102804</guid>
      <dc:creator>MOberschelp</dc:creator>
      <dc:date>2018-02-06T15:27:21Z</dc:date>
    </item>
  </channel>
</rss>

