<?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 extract fields in from this scenario? Fields within a field. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-in-from-this-scenario-Fields-within-a/m-p/62655#M15471</link>
    <description>&lt;P&gt;I would use a named transform with a regular expression, and use &lt;CODE&gt;MV_ADD = true&lt;/CODE&gt;. You'll have to tie the transform to the sourcetype with a &lt;CODE&gt;REPORT-...&lt;/CODE&gt; stanza in props.conf.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/admin/Propsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/Admin/Transformsconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/Admin/Transformsconf&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Sep 2013 02:03:49 GMT</pubDate>
    <dc:creator>sowings</dc:creator>
    <dc:date>2013-09-13T02:03:49Z</dc:date>
    <item>
      <title>How to extract fields in from this scenario? Fields within a field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-in-from-this-scenario-Fields-within-a/m-p/62654#M15470</link>
      <description>&lt;P&gt;I have a field on my events that has the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;john,12345,mark,2356,maria,4567
rachel,8883,john2,488475
nothing to report
NULL
peter,9993
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am trying to create two fields from this. Field1 is called employee, and field2 would be employeeid. I want my end product to look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;employee=john
employeeid=12345
employee=mark
employeeid=2356
...
employee=peter
employeeid=9993
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is that sometimes the events have 1 employe, other times more then one, and the field can also be empty.&lt;/P&gt;

&lt;P&gt;I have been trying to achieve this with makemv or extract|kv with no successful results.&lt;/P&gt;

&lt;P&gt;How would you guys/gals go about getting this done?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2013 01:12:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-in-from-this-scenario-Fields-within-a/m-p/62654#M15470</guid>
      <dc:creator>adrianathome</dc:creator>
      <dc:date>2013-09-13T01:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields in from this scenario? Fields within a field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-in-from-this-scenario-Fields-within-a/m-p/62655#M15471</link>
      <description>&lt;P&gt;I would use a named transform with a regular expression, and use &lt;CODE&gt;MV_ADD = true&lt;/CODE&gt;. You'll have to tie the transform to the sourcetype with a &lt;CODE&gt;REPORT-...&lt;/CODE&gt; stanza in props.conf.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/admin/Propsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/Admin/Transformsconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/Admin/Transformsconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2013 02:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-in-from-this-scenario-Fields-within-a/m-p/62655#M15471</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-09-13T02:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields in from this scenario? Fields within a field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-in-from-this-scenario-Fields-within-a/m-p/62656#M15472</link>
      <description>&lt;P&gt;Awesome! That seem to have worked for the field=value part. Now, what do I need to do so that each field=value has its own event?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2013 03:00:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-in-from-this-scenario-Fields-within-a/m-p/62656#M15472</guid>
      <dc:creator>adrianathome</dc:creator>
      <dc:date>2013-09-13T03:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields in from this scenario? Fields within a field.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-in-from-this-scenario-Fields-within-a/m-p/62657#M15473</link>
      <description>&lt;P&gt;In that case, I might look at "mvexpand". The props / transforms that I described above creates a multi-valued field. mvexpand takes each of those values and splits it into its own event.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/Mvexpand"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/Mvexpand&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2013 03:07:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-in-from-this-scenario-Fields-within-a/m-p/62657#M15473</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-09-13T03:07:35Z</dc:date>
    </item>
  </channel>
</rss>

