<?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: Simple field extraction with data index from /var/spool/splunk in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Simple-field-extraction-with-data-index-from-var-spool-splunk/m-p/80193#M16493</link>
    <description>&lt;P&gt;IN addition, your rex command is trying to capture a space, while your extraction is not trying to capture a space.  I'm not sure if you want one or not.  If you do, that would probably be REGEX = \s([a-z][a-z]-[a-z][a-z][a-z][0-9][0-9])&lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2011 23:50:23 GMT</pubDate>
    <dc:creator>jrodman</dc:creator>
    <dc:date>2011-04-13T23:50:23Z</dc:date>
    <item>
      <title>Simple field extraction with data index from /var/spool/splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Simple-field-extraction-with-data-index-from-var-spool-splunk/m-p/80191#M16491</link>
      <description>&lt;P&gt;Not working......&lt;/P&gt;

&lt;P&gt;I'm testing field extractions on some new logs.  I created simple regex to extract server names from the logs, and used REPORTS in transforms.  The field extraction is not working at search time.  validated with rex. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "(?&amp;lt;servername&amp;gt; [a-z][a-z]-[a-z][a-z][a-z][0-9][0-9])"


-rw------- 1 root   root    75 Apr 12 20:51 props.conf
-rw-r--r-- 1 root   root   111 Apr 12 19:50 transforms.conf
[root@id-spk01 local]# pwd
/opt/splunk/etc/system/local

--------------------------------
#props

[sourcetype::CoreLogs]
REPORT-servername = core_server_name

#transforms

[core_server_name]
REGEX = ([a-z][a-z]-[a-z][a-z][a-z][0-9][0-9])
FORMAT = core_server_name::"$1"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Apr 2011 08:13:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Simple-field-extraction-with-data-index-from-var-spool-splunk/m-p/80191#M16491</guid>
      <dc:creator>tkropp</dc:creator>
      <dc:date>2011-04-13T08:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Simple field extraction with data index from /var/spool/splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Simple-field-extraction-with-data-index-from-var-spool-splunk/m-p/80192#M16492</link>
      <description>&lt;P&gt;You shouldn't have &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype::whatever]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but just&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[whatever]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, omit the quotes from around &lt;CODE&gt;$1&lt;/CODE&gt;, i.e. &lt;CODE&gt;fieldname::$1&lt;/CODE&gt; instead of &lt;CODE&gt;fieldname::"$1"&lt;/CODE&gt;. &lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2011 11:23:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Simple-field-extraction-with-data-index-from-var-spool-splunk/m-p/80192#M16492</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-04-13T11:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Simple field extraction with data index from /var/spool/splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Simple-field-extraction-with-data-index-from-var-spool-splunk/m-p/80193#M16493</link>
      <description>&lt;P&gt;IN addition, your rex command is trying to capture a space, while your extraction is not trying to capture a space.  I'm not sure if you want one or not.  If you do, that would probably be REGEX = \s([a-z][a-z]-[a-z][a-z][a-z][0-9][0-9])&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2011 23:50:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Simple-field-extraction-with-data-index-from-var-spool-splunk/m-p/80193#M16493</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2011-04-13T23:50:23Z</dc:date>
    </item>
  </channel>
</rss>

