<?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 writing a rex for transforms in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/writing-a-rex-for-transforms/m-p/111051#M23296</link>
    <description>&lt;P&gt;Hello All, &lt;BR /&gt;
I would appreciate some assistance in writing a transforms stanza. &lt;BR /&gt;
I am ingesting logs in which both the logname and one of the path directories both have random names. This is causing my source count to go through the roof. See below: &lt;/P&gt;

&lt;P&gt;/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920647/AE_BICURCNV_1920647.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920659/AE_BICURCNV_1920659.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920665/AE_BICURCNV_1920665.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920672/AE_BICURCNV_1920672.AET&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920672/AE_BICURCNV_1920672.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920678/AE_BICURCNV_1920678.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920695/AE_BICURCNV_1920695.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920723/AE_BICURCNV_1920723.stdout&lt;/P&gt;

&lt;P&gt;As you can see the directory before the log file keeps on changing. I need to write a transform to ignore everything after 'AE' and then the file name. &lt;BR /&gt;
So it almost would like the following: &lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE/AE.stdout&lt;/P&gt;

&lt;P&gt;Can someone help me write the regex for my transforms base file that i can reference which would achieve this. thanks in advance.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:38:41 GMT</pubDate>
    <dc:creator>gurinderbhatti</dc:creator>
    <dc:date>2020-09-28T15:38:41Z</dc:date>
    <item>
      <title>writing a rex for transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/writing-a-rex-for-transforms/m-p/111051#M23296</link>
      <description>&lt;P&gt;Hello All, &lt;BR /&gt;
I would appreciate some assistance in writing a transforms stanza. &lt;BR /&gt;
I am ingesting logs in which both the logname and one of the path directories both have random names. This is causing my source count to go through the roof. See below: &lt;/P&gt;

&lt;P&gt;/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920647/AE_BICURCNV_1920647.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920659/AE_BICURCNV_1920659.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920665/AE_BICURCNV_1920665.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920672/AE_BICURCNV_1920672.AET&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920672/AE_BICURCNV_1920672.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920678/AE_BICURCNV_1920678.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920695/AE_BICURCNV_1920695.stdout&lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE_BICURCNV_1920723/AE_BICURCNV_1920723.stdout&lt;/P&gt;

&lt;P&gt;As you can see the directory before the log file keeps on changing. I need to write a transform to ignore everything after 'AE' and then the file name. &lt;BR /&gt;
So it almost would like the following: &lt;BR /&gt;
/appserv/prcs/FSPRD/log_output/AE/AE.stdout&lt;/P&gt;

&lt;P&gt;Can someone help me write the regex for my transforms base file that i can reference which would achieve this. thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:38:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/writing-a-rex-for-transforms/m-p/111051#M23296</guid>
      <dc:creator>gurinderbhatti</dc:creator>
      <dc:date>2020-09-28T15:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: writing a rex for transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/writing-a-rex-for-transforms/m-p/111052#M23297</link>
      <description>&lt;P&gt;No.  You can't do that with a regex.  I mean you can create the REGEX, but it will not effect the source overload.  The REGEX just tells Splunk which file to 'get'.  The determination of Source is something completely different - it is automatic and it is based on the real file path.&lt;/P&gt;

&lt;P&gt;What you really want to do is override &lt;CODE&gt;source&lt;/CODE&gt;.  Check out this doc:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/97128/question-about-override-source-value-for-a-single-input"&gt;http://answers.splunk.com/answers/97128/question-about-override-source-value-for-a-single-input&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 20:33:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/writing-a-rex-for-transforms/m-p/111052#M23297</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-01-13T20:33:26Z</dc:date>
    </item>
  </channel>
</rss>

