<?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 break out user and ip from a single field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239952#M188784</link>
    <description>&lt;P&gt;Thanks for the points omgwut56k. If you feel the solution works, please mark it as solved. thanks&lt;/P&gt;</description>
    <pubDate>Fri, 19 Aug 2016 06:37:52 GMT</pubDate>
    <dc:creator>gfuente</dc:creator>
    <dc:date>2016-08-19T06:37:52Z</dc:date>
    <item>
      <title>How break out user and ip from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239948#M188780</link>
      <description>&lt;P&gt;My data for field entity contains either a username or an ip address.&lt;/P&gt;

&lt;P&gt;How can make a new field for either user or src_ip?&lt;/P&gt;

&lt;P&gt;for example&lt;/P&gt;

&lt;P&gt;entity=rhoward&lt;BR /&gt;
entity=10.0.0.1&lt;BR /&gt;
entity=192.168.1.1&lt;BR /&gt;
entity=jbozo&lt;/P&gt;

&lt;P&gt;I would like a new field for user and src_ip&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 14:52:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239948#M188780</guid>
      <dc:creator>omgwut56k</dc:creator>
      <dc:date>2016-08-18T14:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: How break out user and ip from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239949#M188781</link>
      <description>&lt;P&gt;This is a job for &lt;CODE&gt;coalesce&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval newField=coalesce(user, src_ip) | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Aug 2016 14:55:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239949#M188781</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-18T14:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: How break out user and ip from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239950#M188782</link>
      <description>&lt;P&gt;Thank you. However if the field has an ip address I would like that to be expressed src_ip, if it's a user I would like it expressed as user.. Is that possible?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 14:59:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239950#M188782</guid>
      <dc:creator>omgwut56k</dc:creator>
      <dc:date>2016-08-18T14:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: How break out user and ip from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239951#M188783</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;You could create two new fields from the entity one, like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval user=if(match(entity, "[a-zA-Z]+"), entity, null) | eval src_ip=if(match(entity, "^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$"), entity, null)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 15:13:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239951#M188783</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2016-08-18T15:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: How break out user and ip from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239952#M188784</link>
      <description>&lt;P&gt;Thanks for the points omgwut56k. If you feel the solution works, please mark it as solved. thanks&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2016 06:37:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239952#M188784</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2016-08-19T06:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: How break out user and ip from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239953#M188785</link>
      <description>&lt;P&gt;I 'accepted' the answer. Not sure where here to mark it as solved. &lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2016 13:18:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239953#M188785</guid>
      <dc:creator>omgwut56k</dc:creator>
      <dc:date>2016-08-19T13:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: How break out user and ip from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239954#M188786</link>
      <description>&lt;P&gt;"Accepted" == solved.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2016 13:28:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-break-out-user-and-ip-from-a-single-field/m-p/239954#M188786</guid>
      <dc:creator>nnmiller</dc:creator>
      <dc:date>2016-08-19T13:28:01Z</dc:date>
    </item>
  </channel>
</rss>

