<?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: field extraction working with rex but not props.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527330#M88933</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp; - yes I've tried that in props, but no extraction.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Oct 2020 16:15:54 GMT</pubDate>
    <dc:creator>jdmclemore</dc:creator>
    <dc:date>2020-10-30T16:15:54Z</dc:date>
    <item>
      <title>field extraction working with rex but not props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527179#M88917</link>
      <description>&lt;P&gt;I am trying to extract a portion of the source as a field. Here's what the source looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;D:\Host Logs\info.server.02.mfl&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to extract "&lt;STRONG&gt;info&lt;/STRONG&gt;" from the source filename and this works perfectly as a splunk search:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search | rex field=source "D:\\\Host Logs\\\(?&amp;lt;newfield&amp;gt;[\w]+).\w+.\w+.(mfl|MFL)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I put this in props.conf for this sourcetype as a search-time extraction, it's not working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EXTRACT-sourcefield = "D:\\\Host Logs\\\(?&amp;lt;newfield&amp;gt;[\w]+).\w+.\w+.(mfl|MFL)" in source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried multiple versions of this, taking out the extra "\", removing the quotes, etc., but cant seem to get this field to extract. A "splunk btool props list..." shows that the props.conf file is being used. It's in an app in /opt/splunk/etc/apps. This is Splunk Enterprise 8.0.4.1.&lt;/P&gt;&lt;P&gt;Edit: Here are all the versions I've tried so far...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EXTRACT-sourcefield = D:\x5CHost Logs\x5C(?&amp;lt;newfield&amp;gt;[\w]+).\w+.\w+.(mfl|MFL) in source
EXTRACT-sourcefield = D:\\Host Logs\\(?&amp;lt;newfield&amp;gt;[\w]+).\w+.\w+.(mfl|MFL) in source
EXTRACT-sourcefield = "D:\\\Host Logs\\\(?&amp;lt;newfield&amp;gt;[\w]+).\w+.\w+.(mfl|MFL)" in source
EXTRACT-sourcefield = "D:\\Host Logs\\(?&amp;lt;newfield&amp;gt;[\w]+).\w+.\w+.(mfl|MFL)" in source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 16:28:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527179#M88917</guid>
      <dc:creator>jdmclemore</dc:creator>
      <dc:date>2020-10-30T16:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction working with rex but not props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527311#M88928</link>
      <description>&lt;P&gt;Have you tried this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EXTRACT-sourcefield = D:\\Host Logs\\(?&amp;lt;newfield&amp;gt;[\w]+)\.\w+\.\w+\.(mfl|MFL) in source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 13:43:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527311#M88928</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-10-30T13:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction working with rex but not props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527325#M88932</link>
      <description>&lt;P&gt;Or you can try:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EXTRACT-sourcefield = D:\x5CHost Logs\x5C(?&amp;lt;newfield&amp;gt;[\w]+).\w+.\w+.(mfl|MFL)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 30 Oct 2020 15:37:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527325#M88932</guid>
      <dc:creator>amiftah_splunk</dc:creator>
      <dc:date>2020-10-30T15:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction working with rex but not props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527330#M88933</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp; - yes I've tried that in props, but no extraction.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 16:15:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527330#M88933</guid>
      <dc:creator>jdmclemore</dc:creator>
      <dc:date>2020-10-30T16:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction working with rex but not props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527332#M88934</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/152991"&gt;@amiftah_splunk&lt;/a&gt;&amp;nbsp; - unfortunately, this isn't working either.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 16:19:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527332#M88934</guid>
      <dc:creator>jdmclemore</dc:creator>
      <dc:date>2020-10-30T16:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction working with rex but not props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527334#M88936</link>
      <description>&lt;P&gt;Are you extracting from a field?&lt;/P&gt;&lt;P&gt;You may need to use transforms:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;transforms.conf:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[example]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SOURCE_KEY = source&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;REGEX = &amp;lt;your_regex&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;props.conf:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;REPORT-example = example&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 16:26:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527334#M88936</guid>
      <dc:creator>amiftah_splunk</dc:creator>
      <dc:date>2020-10-30T16:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction working with rex but not props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527338#M88938</link>
      <description>&lt;P&gt;Yes, extracting from the source field. I haven't tried going the REPORT route and using transforms.conf because its a simple inline extraction that shouldnt require transforms, per the documentation. Maybe worth giving it a shot though.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 16:39:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527338#M88938</guid>
      <dc:creator>jdmclemore</dc:creator>
      <dc:date>2020-10-30T16:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction working with rex but not props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527600#M88971</link>
      <description>&lt;P&gt;Tried using REPORT and transforms, but still no good extraction...&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 21:03:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-extraction-working-with-rex-but-not-props-conf/m-p/527600#M88971</guid>
      <dc:creator>jdmclemore</dc:creator>
      <dc:date>2020-11-02T21:03:25Z</dc:date>
    </item>
  </channel>
</rss>

