<?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 windows sources in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-windows-sources/m-p/34909#M7616</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;I am attempting to use props and tranforms to extract field values from the source field. the source is coming from a Windows machine. I am able to extract fields from source from Linux sources however doesnt seem to be working for me from Windows sources. I am guessing there is something wrong with the regex below, hoping someone can take a look.&lt;/P&gt;

&lt;P&gt;From the below at search time I am expecting to see two fields avaialble:
application=NetShimService
port=9932&lt;/P&gt;

&lt;P&gt;source:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;C:\Program Files\DTS\remotelogging\logs\NetShimService\Logs\9932\BRAVO_TMS_DEV_MDS.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;tranforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dtsAppName]
SOURCE_KEY = source
REGEX = C:\\\Program Files\\\DTS\\\remotelogging\\\logs\\\(?&amp;lt;application&amp;gt;.*)\\\Logs\\\?&amp;lt;port&amp;gt;[0-9].*\\\.*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[applogs]
BREAK_ONLY_BEFORE_DATE = false
BREAK_ONLY_BEFORE = LOG_ENTRY
REPORT-dts = dtsAppName
TRANSFORMS-dtsremove = setNull
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 21 Aug 2010 21:11:45 GMT</pubDate>
    <dc:creator>Josh</dc:creator>
    <dc:date>2010-08-21T21:11:45Z</dc:date>
    <item>
      <title>Field extraction windows sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-windows-sources/m-p/34909#M7616</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;I am attempting to use props and tranforms to extract field values from the source field. the source is coming from a Windows machine. I am able to extract fields from source from Linux sources however doesnt seem to be working for me from Windows sources. I am guessing there is something wrong with the regex below, hoping someone can take a look.&lt;/P&gt;

&lt;P&gt;From the below at search time I am expecting to see two fields avaialble:
application=NetShimService
port=9932&lt;/P&gt;

&lt;P&gt;source:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;C:\Program Files\DTS\remotelogging\logs\NetShimService\Logs\9932\BRAVO_TMS_DEV_MDS.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;tranforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dtsAppName]
SOURCE_KEY = source
REGEX = C:\\\Program Files\\\DTS\\\remotelogging\\\logs\\\(?&amp;lt;application&amp;gt;.*)\\\Logs\\\?&amp;lt;port&amp;gt;[0-9].*\\\.*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[applogs]
BREAK_ONLY_BEFORE_DATE = false
BREAK_ONLY_BEFORE = LOG_ENTRY
REPORT-dts = dtsAppName
TRANSFORMS-dtsremove = setNull
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Aug 2010 21:11:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-windows-sources/m-p/34909#M7616</guid>
      <dc:creator>Josh</dc:creator>
      <dc:date>2010-08-21T21:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction windows sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-windows-sources/m-p/34910#M7617</link>
      <description>&lt;P&gt;Not sure why but my regex test tools did not like your regex. Try this to see if it works: &lt;/P&gt;

&lt;P&gt;tranforms.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dtsAppName]
REGEX = C:\\Program Files\\DTS\\remotelogging\\....\\(?&amp;lt;application&amp;gt;.+?)\\.ogs\\(?&amp;lt;port&amp;gt;\d+)\\.*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Aug 2010 22:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-windows-sources/m-p/34910#M7617</guid>
      <dc:creator>zscgeek</dc:creator>
      <dc:date>2010-08-21T22:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction windows sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-windows-sources/m-p/34911#M7618</link>
      <description>&lt;P&gt;Your regex should be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = (?i)C:\\Program Files\\DTS\\remotelogging\\logs\\(?&amp;lt;application&amp;gt;[^\\]*)\\Logs\\(?&amp;lt;port&amp;gt;\d*)\\
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;UL&gt;
&lt;LI&gt;You were missing parentheses around the &lt;CODE&gt;port&lt;/CODE&gt; capture group.&lt;/LI&gt;
&lt;LI&gt;In regex, a &lt;CODE&gt;\&lt;/CODE&gt; (backslash) character should be escaped as &lt;CODE&gt;\\&lt;/CODE&gt; (two backslashes), not &lt;CODE&gt;\\\&lt;/CODE&gt; (three backslashes).&lt;/LI&gt;
&lt;LI&gt;Not absolutely required, but you should make the regex case-insensitive when comparing against Windows paths with &lt;CODE&gt;(?i)&lt;/CODE&gt;.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sat, 21 Aug 2010 23:23:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-windows-sources/m-p/34911#M7618</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-08-21T23:23:51Z</dc:date>
    </item>
  </channel>
</rss>

