<?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 not working with transforms and props in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Field-extraction-not-working-with-transforms-and-props/m-p/676777#M9867</link>
    <description>&lt;P&gt;In my indexes.conf there isn't a stanza specified for source type the lines i have are&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[example]

coldPath

coldToFrozenDir

enableDataIntergrity

homePath

thawedpath&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The index in the props.conf that works is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::C:\\examplelogs*]

EXTRACT-logs = Hostname&amp;gt;(?&amp;lt;hostname&amp;gt;(.*?))&amp;lt;/Hostname&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 06 Feb 2024 20:48:00 GMT</pubDate>
    <dc:creator>lclayton95</dc:creator>
    <dc:date>2024-02-06T20:48:00Z</dc:date>
    <item>
      <title>Field extraction not working with transforms and props</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Field-extraction-not-working-with-transforms-and-props/m-p/676744#M9865</link>
      <description>&lt;P&gt;I am trying to extract some field values that comes in the following format&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;date&amp;gt;00-mon-year&amp;lt;/date&amp;gt;
&amp;lt;DisplayName&amp;gt;example&amp;lt;/DisplayName&amp;gt;

&amp;lt;Hostname&amp;gt;example&amp;lt;/Hostname&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When using the spl rex function i am able to extract the fields using&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;rex field=_raw "Hostname&amp;gt;(?&amp;lt;hostname&amp;gt;.*)&amp;lt;".&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then i have tried to use both a inline regex function in props with the same regex (without quotes) and it does not work. I have also used a transforms.conf with the stanza as follows&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[hostname]

FORMAT = Hostname::$1

REGEX =  Hostname&amp;gt;(?&amp;lt;hostname&amp;gt;(.*?))&amp;lt;/Hostname&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then in the props&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;REPORT -Hostname = hostname&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and this does not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, i have another source that pulls the same type of logs and i am able to use inline regex in spl format just fine with no issues. This issue is only specific to this source which i have as&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[source::/opt/*]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas on this fix?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 15:07:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Field-extraction-not-working-with-transforms-and-props/m-p/676744#M9865</guid>
      <dc:creator>lclayton95</dc:creator>
      <dc:date>2024-02-06T15:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working with transforms and props</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Field-extraction-not-working-with-transforms-and-props/m-p/676749#M9866</link>
      <description>&lt;P&gt;It's best to put sample data and configs in code blocks so the formatting is retained.&lt;/P&gt;&lt;P&gt;You say you tried an inline regex in props.&amp;nbsp;&amp;nbsp; Would you please share that?&amp;nbsp; The transform shared looks like it should have worked.&amp;nbsp; Please confirm the sourcetype in inputs.conf matches that in props.conf.&lt;/P&gt;&lt;P&gt;You have a source that works - how does that working config differ from the non-working one?&amp;nbsp; Please share the complete stanzas so we can spot any differences.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 14:43:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Field-extraction-not-working-with-transforms-and-props/m-p/676749#M9866</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-02-06T14:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working with transforms and props</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Field-extraction-not-working-with-transforms-and-props/m-p/676777#M9867</link>
      <description>&lt;P&gt;In my indexes.conf there isn't a stanza specified for source type the lines i have are&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[example]

coldPath

coldToFrozenDir

enableDataIntergrity

homePath

thawedpath&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The index in the props.conf that works is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::C:\\examplelogs*]

EXTRACT-logs = Hostname&amp;gt;(?&amp;lt;hostname&amp;gt;(.*?))&amp;lt;/Hostname&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 06 Feb 2024 20:48:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Field-extraction-not-working-with-transforms-and-props/m-p/676777#M9867</guid>
      <dc:creator>lclayton95</dc:creator>
      <dc:date>2024-02-06T20:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction not working with transforms and props</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Field-extraction-not-working-with-transforms-and-props/m-p/676781#M9868</link>
      <description>&lt;P&gt;Sourcetypes should match between inputs.conf and props.conf, except when props are specified for hosts or sources rather than sourcetypes.&amp;nbsp; The indexes.conf file does not use sourcetypes.&lt;/P&gt;&lt;P&gt;The regex needs an escape character before the /.&amp;nbsp; Also, the expression has two capture groups so make sure $1 is the group you expect.&amp;nbsp; Or use a single group.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Hostname&amp;gt;(?&amp;lt;hostname&amp;gt;.*?)&amp;lt;\/Hostname&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 06 Feb 2024 22:16:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Field-extraction-not-working-with-transforms-and-props/m-p/676781#M9868</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-02-06T22:16:04Z</dc:date>
    </item>
  </channel>
</rss>

