<?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 CLONE_SOURCETYPE not honoring REGEX? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/CLONE-SOURCETYPE-not-honoring-REGEX/m-p/530678#M89310</link>
    <description>&lt;P&gt;While attempting to clone (and mask) events that belong to select source patterns,. the CLONE_SOURCETYPE doesn't honor the REGEX. The goal is to restrict cloning to those events that have dev or tst in their source.&amp;nbsp; So prod or perf or uat etc wouldn't get cloned.&amp;nbsp;&lt;/P&gt;&lt;P&gt;it seems that the no matter what the REGEX in the clone stanza in transforms, the events gets cloned.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The temporary solution was to run a nullQueue for those non-dev and non-tst sources.&lt;/P&gt;&lt;P&gt;What am I doing wrong here?&amp;nbsp; Any thoughts/suggestions? &lt;STRONG&gt;Note&lt;/STRONG&gt; -The test file doesn't have any source defined. The only place I supply a source is using the rename-source argument as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Code fragment&amp;nbsp;&lt;/P&gt;&lt;P&gt;How I run this using oneshot -&lt;/P&gt;&lt;P&gt;splunk add oneshot test-foo.txt -rename-source "sfdc_object://User_splunk_&lt;STRONG&gt;dev&lt;/STRONG&gt;_cnf" -index mask&amp;nbsp; -sourcetype sfdc:orig -host dev_01 [&lt;STRONG&gt;WORKS- clones should be created. Works as expected&lt;/STRONG&gt;]&lt;/P&gt;&lt;P&gt;splunk add oneshot test-foo.txt -rename-source "sfdc_object://User_splunk_&lt;STRONG&gt;prod&lt;/STRONG&gt;_cnf" -index mask&amp;nbsp; -sourcetype sfdc:orig -host dev_02&amp;nbsp; [&lt;STRONG&gt;DOESN'T WORK - clones shouldn't be created, but they are&lt;/STRONG&gt;]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;props..conf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[sfdc:orig]&lt;BR /&gt;TRANSFORMS-sfdc-orig = sfdc_cloner&lt;/P&gt;&lt;P&gt;[sfdc:clone]&lt;BR /&gt;EVAL-mn = "foo"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;# sources are one of the following -&amp;nbsp; sfdc_object://User_splunk_dev_cnf sfdc_object://User_splunk_tst_cnf&amp;nbsp; &amp;nbsp; &amp;nbsp; sfdc_object://User_splunk_prod_cnf ...&lt;/P&gt;&lt;P&gt;[sfdc_cloner]&lt;BR /&gt;#Only clone those where sources don't have _prod_&amp;nbsp;&lt;BR /&gt;REGEX = ^(?=.*(dev|tst)).*&lt;BR /&gt;# Tried this as well - no bueno&lt;BR /&gt;#REGEX = (sfdc_object:.*(dev|tst)_cnf.*)&lt;/P&gt;&lt;P&gt;SOURCE_KEY = MetaData:Source&lt;BR /&gt;FORMAT = $0&lt;BR /&gt;DEST_KEY = _raw&lt;BR /&gt;CLONE_SOURCETYPE = sfdc:clone&lt;/P&gt;</description>
    <pubDate>Tue, 24 Nov 2020 20:25:47 GMT</pubDate>
    <dc:creator>manojnair</dc:creator>
    <dc:date>2020-11-24T20:25:47Z</dc:date>
    <item>
      <title>CLONE_SOURCETYPE not honoring REGEX?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CLONE-SOURCETYPE-not-honoring-REGEX/m-p/530678#M89310</link>
      <description>&lt;P&gt;While attempting to clone (and mask) events that belong to select source patterns,. the CLONE_SOURCETYPE doesn't honor the REGEX. The goal is to restrict cloning to those events that have dev or tst in their source.&amp;nbsp; So prod or perf or uat etc wouldn't get cloned.&amp;nbsp;&lt;/P&gt;&lt;P&gt;it seems that the no matter what the REGEX in the clone stanza in transforms, the events gets cloned.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The temporary solution was to run a nullQueue for those non-dev and non-tst sources.&lt;/P&gt;&lt;P&gt;What am I doing wrong here?&amp;nbsp; Any thoughts/suggestions? &lt;STRONG&gt;Note&lt;/STRONG&gt; -The test file doesn't have any source defined. The only place I supply a source is using the rename-source argument as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Code fragment&amp;nbsp;&lt;/P&gt;&lt;P&gt;How I run this using oneshot -&lt;/P&gt;&lt;P&gt;splunk add oneshot test-foo.txt -rename-source "sfdc_object://User_splunk_&lt;STRONG&gt;dev&lt;/STRONG&gt;_cnf" -index mask&amp;nbsp; -sourcetype sfdc:orig -host dev_01 [&lt;STRONG&gt;WORKS- clones should be created. Works as expected&lt;/STRONG&gt;]&lt;/P&gt;&lt;P&gt;splunk add oneshot test-foo.txt -rename-source "sfdc_object://User_splunk_&lt;STRONG&gt;prod&lt;/STRONG&gt;_cnf" -index mask&amp;nbsp; -sourcetype sfdc:orig -host dev_02&amp;nbsp; [&lt;STRONG&gt;DOESN'T WORK - clones shouldn't be created, but they are&lt;/STRONG&gt;]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;props..conf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[sfdc:orig]&lt;BR /&gt;TRANSFORMS-sfdc-orig = sfdc_cloner&lt;/P&gt;&lt;P&gt;[sfdc:clone]&lt;BR /&gt;EVAL-mn = "foo"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;# sources are one of the following -&amp;nbsp; sfdc_object://User_splunk_dev_cnf sfdc_object://User_splunk_tst_cnf&amp;nbsp; &amp;nbsp; &amp;nbsp; sfdc_object://User_splunk_prod_cnf ...&lt;/P&gt;&lt;P&gt;[sfdc_cloner]&lt;BR /&gt;#Only clone those where sources don't have _prod_&amp;nbsp;&lt;BR /&gt;REGEX = ^(?=.*(dev|tst)).*&lt;BR /&gt;# Tried this as well - no bueno&lt;BR /&gt;#REGEX = (sfdc_object:.*(dev|tst)_cnf.*)&lt;/P&gt;&lt;P&gt;SOURCE_KEY = MetaData:Source&lt;BR /&gt;FORMAT = $0&lt;BR /&gt;DEST_KEY = _raw&lt;BR /&gt;CLONE_SOURCETYPE = sfdc:clone&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 20:25:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CLONE-SOURCETYPE-not-honoring-REGEX/m-p/530678#M89310</guid>
      <dc:creator>manojnair</dc:creator>
      <dc:date>2020-11-24T20:25:47Z</dc:date>
    </item>
  </channel>
</rss>

