<?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: How to develop a regular expression for my file paths to update in transforms.conf? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342136#M63025</link>
    <description>&lt;P&gt;there is one entry defined for log inputs.  this happens to resolve to (at least) 6 different source files.  Each unique file type should have a sourcetype, however these are all assigned to a single sourcetype.&lt;/P&gt;

&lt;P&gt;I have to create each source type for that source paths&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2017 16:45:09 GMT</pubDate>
    <dc:creator>cleelakrishna</dc:creator>
    <dc:date>2017-04-20T16:45:09Z</dc:date>
    <item>
      <title>How to develop a regular expression for my file paths to update in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342133#M63022</link>
      <description>&lt;P&gt;How to develop a regular expression for the below paths to update in transforms.conf?&lt;/P&gt;

&lt;P&gt;/srv/tomcat7/iiq/logs/sailpoint.log&lt;BR /&gt;
/srv/tomcat7/iiq/logs/localhost_access_log.2017-04-19.txt&lt;BR /&gt;
/srv/tomcat7/iiq/logs/catalina.out&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:46:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342133#M63022</guid>
      <dc:creator>cleelakrishna</dc:creator>
      <dc:date>2020-09-29T13:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop a regular expression for my file paths to update in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342134#M63023</link>
      <description>&lt;P&gt;If you're looking to capture the filenames, try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; \/src\/tomcat7\/iiq\/logs\/(.*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or if you're extracting as a field&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; \/src\/tomcat7\/iiq\/logs\/(?&amp;lt;fileName&amp;gt;.*)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Apr 2017 16:27:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342134#M63023</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-04-20T16:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop a regular expression for my file paths to update in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342135#M63024</link>
      <description>&lt;P&gt;What you want to do with these path in the transforms.conf? Search time or index time?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 16:28:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342135#M63024</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-20T16:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop a regular expression for my file paths to update in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342136#M63025</link>
      <description>&lt;P&gt;there is one entry defined for log inputs.  this happens to resolve to (at least) 6 different source files.  Each unique file type should have a sourcetype, however these are all assigned to a single sourcetype.&lt;/P&gt;

&lt;P&gt;I have to create each source type for that source paths&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 16:45:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342136#M63025</guid>
      <dc:creator>cleelakrishna</dc:creator>
      <dc:date>2017-04-20T16:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop a regular expression for my file paths to update in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342137#M63026</link>
      <description>&lt;P&gt;In props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YourSourcetypeHere]
REPORT-filename_from_source = filename_from_source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[filename_from_source]
SOURCE_KEY = source
REGEX = [^\\\/]+$
FORMAT = finename::$1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Apr 2017 18:15:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342137#M63026</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-20T18:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop a regular expression for my file paths to update in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342138#M63027</link>
      <description>&lt;P&gt;cleelakrishna,&lt;/P&gt;

&lt;P&gt;If one of the below answers resolved your issue, could you please mark it Accepted?  If they both did, Accept the most useful of the answers and upvote the other!&lt;/P&gt;

&lt;P&gt;If it did not, please post back with more information or what's not working right so we can help finish this up!&lt;/P&gt;

&lt;P&gt;Happy Splunking,&lt;BR /&gt;
Rich&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2017 18:42:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-develop-a-regular-expression-for-my-file-paths-to-update/m-p/342138#M63027</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-07-16T18:42:06Z</dc:date>
    </item>
  </channel>
</rss>

