<?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 field extraction based on &amp;quot;=&amp;gt;&amp;quot; in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-based-on-quot-gt-quot/m-p/195025#M38805</link>
    <description>&lt;P&gt;I am consuming facter data from Puppet in the format of "virtual =&amp;gt; vmware". Each host has on average 180 unique data points all in the same format with different field names. &lt;/P&gt;

&lt;P&gt;The format is almost a key value pair, but not quite. Is it possible to have Splunk extract the fields for Puppet facts i.e. virtual =&amp;gt; vmware so that the field name is virtual and the value is vmware without having to define a field extraction for every single field? Would it make sense to use sed in props to remove "&amp;gt;" to help Splunk automatically extract the field at search time?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 16 Jan 2015 17:09:02 GMT</pubDate>
    <dc:creator>ebailey</dc:creator>
    <dc:date>2015-01-16T17:09:02Z</dc:date>
    <item>
      <title>field extraction based on "=&gt;"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-based-on-quot-gt-quot/m-p/195025#M38805</link>
      <description>&lt;P&gt;I am consuming facter data from Puppet in the format of "virtual =&amp;gt; vmware". Each host has on average 180 unique data points all in the same format with different field names. &lt;/P&gt;

&lt;P&gt;The format is almost a key value pair, but not quite. Is it possible to have Splunk extract the fields for Puppet facts i.e. virtual =&amp;gt; vmware so that the field name is virtual and the value is vmware without having to define a field extraction for every single field? Would it make sense to use sed in props to remove "&amp;gt;" to help Splunk automatically extract the field at search time?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jan 2015 17:09:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-extraction-based-on-quot-gt-quot/m-p/195025#M38805</guid>
      <dc:creator>ebailey</dc:creator>
      <dc:date>2015-01-16T17:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction based on "=&gt;"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-based-on-quot-gt-quot/m-p/195026#M38806</link>
      <description>&lt;P&gt;Using sed in props.conf is not a bad idea, but it is better to use search time field extractions. You could use props.conf with transforms.conf to do the search time field extractions, like so:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yourpuppetsourcetype]
KV_MODE = none
REPORT-yourpuppetsourcetype=extract-puppet-fields
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract-puppet-fields]
REGEX  = (\S+?)=&amp;gt;(\S+?)\s+
FORMAT = $1::$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Don't use the KV_MODE setting if you have  some fields that can be auto-extracted (name=value). The REGEX above will extract name=&amp;gt;value pairs, but it will not properly recognize values that have embedded whitespace.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jan 2015 18:29:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-extraction-based-on-quot-gt-quot/m-p/195026#M38806</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-01-16T18:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction based on "=&gt;"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-based-on-quot-gt-quot/m-p/195027#M38807</link>
      <description>&lt;P&gt;I removed the KV_MODE=none and changed the regex to &lt;/P&gt;

&lt;P&gt;REGEX  = (\S+)\s=&amp;gt;\s(\S+)&lt;/P&gt;

&lt;P&gt;That works just fine. Thanks for pointing me in the right direction.&lt;/P&gt;

&lt;P&gt;Ed&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jan 2015 21:03:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-extraction-based-on-quot-gt-quot/m-p/195027#M38807</guid>
      <dc:creator>ebailey</dc:creator>
      <dc:date>2015-01-16T21:03:25Z</dc:date>
    </item>
  </channel>
</rss>

