<?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: Override sourcetype for custom logs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477390#M81952</link>
    <description>&lt;P&gt;oh so literal %retail is what you mean?&lt;/P&gt;

&lt;P&gt;so you are matching something like this:&lt;BR /&gt;
    &lt;CODE&gt;eventdata=some text from your log blah blah %retail value=23.45&lt;/CODE&gt;&lt;BR /&gt;
in which case, your regex should be fine &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Feb 2020 13:09:15 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2020-02-21T13:09:15Z</dc:date>
    <item>
      <title>Override sourcetype for custom logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477386#M81948</link>
      <description>&lt;P&gt;Hi I am trying to override my current sourcetype to create multiple source types based on key matching patterns. But the settings are not working, my settings are as follows, pls let know me where I go wrong,&lt;BR /&gt;
&lt;STRONG&gt;pros. conf&lt;/STRONG&gt;&lt;BR /&gt;
[transaction:logs]&lt;BR /&gt;
BREAK_ONLY_BEFORE_DATE = true&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
TIME_FORMAT = %Y-%m-%d %H:%M:%S,%3N&lt;BR /&gt;
TIME_PREFIX = ^&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 25&lt;BR /&gt;
TRANSFORMS - sourcetypeoverwrite =receipts, businesstransaction&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;BR /&gt;
[receipts]&lt;BR /&gt;
DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;
REGEX = (%retail)&lt;BR /&gt;
FORMAT = sourcetype::transaction:logs&lt;/P&gt;

&lt;P&gt;[businesstransaction]&lt;BR /&gt;
DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;
REGEX = (%transaction)&lt;BR /&gt;
FORMAT = sourcetype::transaction:logs&lt;/P&gt;

&lt;P&gt;I also tried rule:: option but its not working as well in my props.conf&lt;BR /&gt;
[rule::receipts]&lt;BR /&gt;
sourcetype = receipt&lt;BR /&gt;
MORE_THAN_0 = (%retail)&lt;/P&gt;

&lt;P&gt;[rule::businesstransaction]&lt;BR /&gt;
sourcetype = businesstransaction&lt;BR /&gt;
MORE_THAN_0 = (%transaction)&lt;/P&gt;

&lt;P&gt;Yet am not getting results in either of methods. Is there any better way to look into this.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:18:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477386#M81948</guid>
      <dc:creator>sundarrajan</dc:creator>
      <dc:date>2020-09-30T04:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Override sourcetype for custom logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477387#M81949</link>
      <description>&lt;P&gt;I also tried with INGEST_EVAL &lt;BR /&gt;
INGEST_EVAL = sourcetype:=case(sourcetype=="transaction", "businesstransaction",  sourcetype=="retail", "receipts", true(), sourcetype), still its not splitting as expected.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:18:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477387#M81949</guid>
      <dc:creator>sundarrajan</dc:creator>
      <dc:date>2020-09-30T04:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Override sourcetype for custom logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477388#M81950</link>
      <description>&lt;P&gt;You don't say what you want the new sourcetypes called?&lt;/P&gt;

&lt;P&gt;I'll assume they should be called transaction:receipts and transaction: businesstransaction ...&lt;BR /&gt;
transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[receipts]
DEST_KEY = MetaData:Sourcetype
REGEX = (%retail)
FORMAT = sourcetype::transaction:receipts

[businesstransaction]
DEST_KEY = MetaData:Sourcetype
REGEX = (%transaction)
FORMAT = sourcetype::transaction:businesstransaction
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Im also assuming you are using (%retail) as a placeholder to refer to some regex which matches in your relevant log? %retail is itself not a valid regex expression. so you might need to use something which actually matches. potentially something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventdata=some text from your log which indicates this is a retail log value=23.45 

regex=\w\s(retail)\s
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Feb 2020 12:01:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477388#M81950</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-02-21T12:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Override sourcetype for custom logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477389#M81951</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/23295"&gt;@nickhills&lt;/a&gt; thanks for the response. %retail% &amp;amp; %transaction are the key words. I tried to use these key words from the logs as condition to override the event to a new sourcetype. &lt;BR /&gt;
Please do suggest, if we can use keywords (%retail) in place of regex pattern for the key word. I also tried this key word as part of my rules(MORE_THAN_1 line in the event), but it didn't work.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:18:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477389#M81951</guid>
      <dc:creator>sundarrajan</dc:creator>
      <dc:date>2020-09-30T04:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Override sourcetype for custom logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477390#M81952</link>
      <description>&lt;P&gt;oh so literal %retail is what you mean?&lt;/P&gt;

&lt;P&gt;so you are matching something like this:&lt;BR /&gt;
    &lt;CODE&gt;eventdata=some text from your log blah blah %retail value=23.45&lt;/CODE&gt;&lt;BR /&gt;
in which case, your regex should be fine &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 13:09:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477390#M81952</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-02-21T13:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Override sourcetype for custom logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477391#M81953</link>
      <description>&lt;P&gt;try my transforms example from above,  I think it should work for you.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 13:14:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477391#M81953</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-02-21T13:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Override sourcetype for custom logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477392#M81954</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/23295"&gt;@nickhills&lt;/a&gt;  I tried the transforms.conf, still its not showing up results for me. The input log is XML file and i have other custom conditions like LINE_BREAKER, BREAK_ONLY_BEFORE, MUST_BREAK_AFTER conditions in my props. I presume that is not making any impact on this transforms.conf settings.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:18:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Override-sourcetype-for-custom-logs/m-p/477392#M81954</guid>
      <dc:creator>sundarrajan</dc:creator>
      <dc:date>2020-09-30T04:18:35Z</dc:date>
    </item>
  </channel>
</rss>

