<?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 can I keep the original meta when cloning the event. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749870#M119134</link>
    <description>&lt;P&gt;Here is my props and transforms&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;props.conf
[default]
TRANSFORMS-save_original_sourcetype = save_original_sourcetype
TRANSFORMS-clone_for_thirdparty = clone_for_thirdparty

[data_to_thirdparty]
SHOULD_LINEMERGE = true
TRANSFORMS-updateFields = sourcetype_raw_updated
TRANSFORMS-route_thirdparty = route_thirdparty


transforms.conf
# 1. Save original sourcetype as a field (for use in the clone)
[save_original_sourcetype]
SOURCE_KEY = MetaData:Sourcetype
REGEX = (.+)
FORMAT = orig_sourcetype::$1
WRITE_META = true

# 2. Clone only events from vme_ops_prod to sourcetype=data_to_thirdparty
[clone_for_thirdparty]
SOURCE_KEY = _MetaData:Index
REGEX = ^test_np$
DEST_KEY = MetaData:Sourcetype
CLONE_SOURCETYPE = data_to_thirdparty
WRITE_META = true

# 3. Meta-data transforms for the clone
[sourcetype_raw_updated]
SOURCE_KEY=MetaData:orig_sourcetype
REGEX=^orig_sourcetype::(.*)$
FORMAT = $1##$0
DEST_KEY=_raw

# 4. Route the cloned event ONLY to thirdparty
[route_thirdparty]
SOURCE_KEY = _MetaData:Index
REGEX = (^test_np.*)
DEST_KEY = _TCP_ROUTING
FORMAT = dev_thirdparty&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sending logs (no cooked data) to thirdpartyserver over TCP without disturbing existing flow. so I just cloned the event and adding original sourcetype to the cloned event and sending to thirdparty output group.&lt;/P&gt;&lt;P&gt;now the issue here is I can't find the original source type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jul 2025 05:05:04 GMT</pubDate>
    <dc:creator>sudha_krish</dc:creator>
    <dc:date>2025-07-16T05:05:04Z</dc:date>
    <item>
      <title>how can I keep the original meta when cloning the event.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749844#M119122</link>
      <description>&lt;P&gt;I'm cloning the event and before cloning &amp;nbsp;extracting sourcetype to use later.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;transforms.conf

[copy_original_sourcetype]
SOURCE_KEY = MetaData:Sourcetype
REGEX = (.+)
FORMAT = orig_sourcetype::$1
WRITE_META = true

[clone_for_thirdparty]
SOURCE_KEY = _MetaData:Index
REGEX = ^test_np$
DEST_KEY = MetaData:Sourcetype
CLONE_SOURCETYPE = data_to_thirdparty
WRITE_META = true

[sourcetype_raw_updated]
SOURCE_KEY=MetaData:orig_sourcetype
REGEX=^orig_sourcetype::(.*)$
FORMAT = $1##$0
DEST_KEY=_raw&lt;/LI-CODE&gt;&lt;P&gt;But when I try to retrieve extracted original value &amp;nbsp;I'm getting nothing. Is there any way to persist original sourcetype ?&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 18:37:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749844#M119122</guid>
      <dc:creator>sudha_krish</dc:creator>
      <dc:date>2025-07-15T18:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: how can I keep the original meta when cloning the event.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749845#M119123</link>
      <description>&lt;P&gt;I just want to add the orig_sourcetype to the cloned event with original sourcetype value.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 18:39:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749845#M119123</guid>
      <dc:creator>sudha_krish</dc:creator>
      <dc:date>2025-07-15T18:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: how can I keep the original meta when cloning the event.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749847#M119125</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308717"&gt;@sudha_krish&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please avoid calling out specific users on here - it wont help get your question answered.&lt;/P&gt;&lt;P&gt;Please could you also share your props.conf config?&lt;/P&gt;&lt;P&gt;I dont think this is correct:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SOURCE_KEY=MetaData:orig_sourcetype&lt;/LI-CODE&gt;&lt;P&gt;Can you try:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[copy_original_sourcetype]
SOURCE_KEY = MetaData:Sourcetype
REGEX = (.+)
FORMAT = orig_sourcetype::$1
WRITE_META = true

[clone_for_thirdparty]
SOURCE_KEY = MetaData:Index
REGEX = ^test_np$
DEST_KEY = MetaData:Sourcetype
CLONE_SOURCETYPE = data_to_thirdparty
WRITE_META = true

[sourcetype_raw_updated]
INGEST_EVAL = _raw=_raw." orig_sourcetype=".orig_sourcetype&lt;/LI-CODE&gt;&lt;P&gt;Do you want orig_sourcetype adding to the raw text value?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 19:20:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749847#M119125</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-07-15T19:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: how can I keep the original meta when cloning the event.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749856#M119129</link>
      <description>What is in your props.conf?</description>
      <pubDate>Tue, 15 Jul 2025 20:55:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749856#M119129</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2025-07-15T20:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: how can I keep the original meta when cloning the event.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749870#M119134</link>
      <description>&lt;P&gt;Here is my props and transforms&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;props.conf
[default]
TRANSFORMS-save_original_sourcetype = save_original_sourcetype
TRANSFORMS-clone_for_thirdparty = clone_for_thirdparty

[data_to_thirdparty]
SHOULD_LINEMERGE = true
TRANSFORMS-updateFields = sourcetype_raw_updated
TRANSFORMS-route_thirdparty = route_thirdparty


transforms.conf
# 1. Save original sourcetype as a field (for use in the clone)
[save_original_sourcetype]
SOURCE_KEY = MetaData:Sourcetype
REGEX = (.+)
FORMAT = orig_sourcetype::$1
WRITE_META = true

# 2. Clone only events from vme_ops_prod to sourcetype=data_to_thirdparty
[clone_for_thirdparty]
SOURCE_KEY = _MetaData:Index
REGEX = ^test_np$
DEST_KEY = MetaData:Sourcetype
CLONE_SOURCETYPE = data_to_thirdparty
WRITE_META = true

# 3. Meta-data transforms for the clone
[sourcetype_raw_updated]
SOURCE_KEY=MetaData:orig_sourcetype
REGEX=^orig_sourcetype::(.*)$
FORMAT = $1##$0
DEST_KEY=_raw

# 4. Route the cloned event ONLY to thirdparty
[route_thirdparty]
SOURCE_KEY = _MetaData:Index
REGEX = (^test_np.*)
DEST_KEY = _TCP_ROUTING
FORMAT = dev_thirdparty&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sending logs (no cooked data) to thirdpartyserver over TCP without disturbing existing flow. so I just cloned the event and adding original sourcetype to the cloned event and sending to thirdparty output group.&lt;/P&gt;&lt;P&gt;now the issue here is I can't find the original source type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2025 05:05:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749870#M119134</guid>
      <dc:creator>sudha_krish</dc:creator>
      <dc:date>2025-07-16T05:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: how can I keep the original meta when cloning the event.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749874#M119137</link>
      <description>&lt;P&gt;Transform classes are called in alphabetical order. And please don't call out specific people for help. That's rude.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2025 07:26:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-can-I-keep-the-original-meta-when-cloning-the-event/m-p/749874#M119137</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-07-16T07:26:11Z</dc:date>
    </item>
  </channel>
</rss>

