<?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: Why is one transform overriding the other with my current configuration? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/584412#M102870</link>
    <description>&lt;P&gt;The short answer is that you changed the sourcetype before your [instance] transform could operate on it.&amp;nbsp; I get that this question was first asked 6 years ago, but hopefully this answer reveals similar issues that others may be encountering.&lt;/P&gt;&lt;P&gt;Transforms are applied in alphabetical order by the props name and in the order set in each transforms call.&lt;/P&gt;&lt;P&gt;The order set lists createsource first and instance second:&lt;/P&gt;&lt;PRE&gt;[tomcat-appl]
TRANSFORMS-set = createsource, instance&lt;/PRE&gt;&lt;P&gt;So, [createsource] changes the sourcetype so that the data no longer matches "tomcat-appl" for [instance] to apply to it.&lt;/P&gt;&lt;P&gt;Listing the props transforms calls separately follows the props name rule, where props are called in alphabetical order by prop names:&lt;/P&gt;&lt;PRE&gt;[tomcat-appl]
TRANSFORMS-instance_set = instance&lt;BR /&gt;TRANSFORMS-createsource_set = createsource&lt;/PRE&gt;&lt;P&gt;[createsource] starts with a "c", which is before the "i" of [instance].&amp;nbsp; So [createsource] applies first and changes the sourcetype so that [instance] cannot apply to the data (different sourcetype now).&lt;/P&gt;</description>
    <pubDate>Thu, 10 Feb 2022 00:36:36 GMT</pubDate>
    <dc:creator>landen99</dc:creator>
    <dc:date>2022-02-10T00:36:36Z</dc:date>
    <item>
      <title>Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264356#M50742</link>
      <description>&lt;P&gt;Hey there, I have the following in my props.conf file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tomcat-appl]
TRANSFORMS-set = createsource, instance
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This takes a monitored folder I have (with a dozen or log files) all set to the sourcetype 'tomcat-appl' and runs them through these transforms:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[instance]
SOURCE_KEY = MetaData:Source
REGEX = ^[^\-\n]*\-(?P&amp;lt;instance&amp;gt;\w+)

[createsource]
DEST_KEY = MetaData:Sourcetype
SOURCE_KEY = MetaData:Source
REGEX = ^(?:[^\\\n]*\\){3}([^\.]+)
FORMAT = sourcetype::$1
WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The 'instance' transform indexes a field called 'instance' which is parsed out of the file path the log file comes from. This transform was working fine and in searches a new 'instance' field showed up with all of the expected extractions... once I added 'createsource' then instance stopped working... though createsource works fine, createsource makes each input have a sourcetype of their filename.&lt;/P&gt;

&lt;P&gt;For some reason, instance will not work when createsource is running and I haven't been able to figure out why. It doesn't seem to matter which order I list them in. I thought maybe createsource was switching the sourcetype and causing it not to run instance but even if I define props/transforms for the new sourcetype it still doesn't work... so I'm not entirely sure what's going on. Any suggestions?&lt;/P&gt;

&lt;P&gt;Edit:&lt;BR /&gt;
I should mention that we have a distributed environment where it goes Universal Forwarder &amp;gt; Heavy forwarder &amp;gt; Indexer. I have set all of these props and transforms on the heavy forwarder and they both have worked individually, but not together.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 01:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264356#M50742</guid>
      <dc:creator>michael_sleep</dc:creator>
      <dc:date>2016-03-30T01:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264357#M50743</link>
      <description>&lt;P&gt;Configuration file precedence might be your problem here. Search for stanza "createsource" in all transforms.conf (etc/apps, etc/system/local, etc/users) some file is overriding your settings.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 14:27:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264357#M50743</guid>
      <dc:creator>meenal901</dc:creator>
      <dc:date>2016-04-08T14:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264358#M50744</link>
      <description>&lt;P&gt;There are several factors that can affect how the transforms execute. &lt;/P&gt;

&lt;P&gt;First, transforms are invoked from props.conf - and order of execution can depend on several things, including the class that you gave to the TRANSFORMS statement. But it &lt;EM&gt;doesn't&lt;/EM&gt; depend on the order in which the stanzas appear in transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TRANSFORMS-&amp;lt;class&amp;gt; = transforms_stanza_name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It's a long read, but it is always profitable to study &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf"&gt;props.conf.spec&lt;/A&gt;; I learn something every time I read it, and I have read it many times.&lt;/P&gt;

&lt;P&gt;And as @meenal901 mentioned, you could also have precedence issues. Again, these can arise in props.conf, as well as transforms.conf. Here is the documentation on &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.0/Troubleshooting/Usebtooltotroubleshootconfigurations"&gt;btool&lt;/A&gt; - and a couple of examples that may help:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk cmd btool props list --debug | more
splunk cmd btool transforms list --debug | more
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Apr 2016 17:35:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264358#M50744</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-04-08T17:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264359#M50745</link>
      <description>&lt;P&gt;There are no other configurations for that transform.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 18:04:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264359#M50745</guid>
      <dc:creator>michael_sleep</dc:creator>
      <dc:date>2016-04-08T18:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264360#M50746</link>
      <description>&lt;P&gt;Will look into using btool... I don't have any reason to believe the order something appears in the transforms.conf file would affect precedence but the order of the inline TRANSFORMS- = transform1, transform2, transform3 is something I've wondered about.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 18:06:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264360#M50746</guid>
      <dc:creator>michael_sleep</dc:creator>
      <dc:date>2016-04-08T18:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264361#M50747</link>
      <description>&lt;P&gt;Michael,  fyi lguinn is a Splunk instructor.  If she says the order of precedence matters it matters.  I'm willing to back her on this one because it's true.  You're just setting user configurable variables in conf files.  When the developer codes he/she says take the last value for this variable you find in this conf file.  &lt;/P&gt;

&lt;P&gt;Order of precedence matters.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 19:26:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264361#M50747</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-08T19:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264362#M50748</link>
      <description>&lt;P&gt;As a side note, some props and transforms happen on the universal forwarder.  I'm curious what happens when you deploy the props and transforms to the uf.  There are some lists that show what happens where but it's easier for me to ask you to test...&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 19:34:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264362#M50748</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-04-08T19:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264363#M50749</link>
      <description>&lt;P&gt;You misinterpreted my comment, which was a reply to her original misinterpretation. I was saying the order of the -stanzas- in the transform.conf file doesn't matter, which was what was talking about:&lt;/P&gt;

&lt;P&gt;"it doesn't depend on the order in which the stanzas appear in transforms.conf"&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 19:42:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264363#M50749</guid>
      <dc:creator>michael_sleep</dc:creator>
      <dc:date>2016-04-08T19:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264364#M50750</link>
      <description>&lt;P&gt;These happen during the parsing phase on the heavy forwarder, not on the universal forwarder.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 19:44:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264364#M50750</guid>
      <dc:creator>michael_sleep</dc:creator>
      <dc:date>2016-04-08T19:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264365#M50751</link>
      <description>&lt;P&gt;Yes, overall this discussion is headed in the right direction. When there are multiple TRANSFORM- statements in props.conf, it is my understanding that they are executed in ASCII order of the  &lt;CODE&gt;&amp;lt;class&amp;gt;&lt;/CODE&gt; name, not the stanza name. &lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 21:37:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264365#M50751</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-04-08T21:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264366#M50752</link>
      <description>&lt;P&gt;Okay, after re-reading the original question twice, I wonder if it would make a difference if you did this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [tomcat-appl]
 TRANSFORMS-set =instance,createsource
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I know you said you tried it, but just asking. You are correct that the order of the transforms in the TRANSFORMS-set statement makes a difference. The transforms are executed in the order that they are listed.&lt;/P&gt;

&lt;P&gt;Also, I wonder if you could do the createsource on the HF and the instance transform on the indexer. I am not at all sure that this would work, but it might be worth a try. Of course, you would need a different props.conf attribute to invoke the instance transform, since all the sourcetypes would have changed at that point.&lt;/P&gt;

&lt;P&gt;(P.S. - being an instructor doesn't make me right - I wish!)&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 21:47:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264366#M50752</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-04-08T21:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264367#M50753</link>
      <description>&lt;P&gt;I had tried that previously and it didn't have an effect. I had also tried it on the indexer but that didn't work (I didn't expect it to because the heavy forwarder does it before it reaches the indexer). I probably won't ever know what that wasn't working because I 'fixed' it with a search-time extraction for the 'instance' transform I was doing previously. Some definite oddness there.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2016 15:25:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264367#M50753</guid>
      <dc:creator>michael_sleep</dc:creator>
      <dc:date>2016-04-11T15:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264368#M50754</link>
      <description>&lt;P&gt;Good! A search time field extract is preferable for this case.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2016 21:33:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/264368#M50754</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-04-11T21:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one transform overriding the other with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/584412#M102870</link>
      <description>&lt;P&gt;The short answer is that you changed the sourcetype before your [instance] transform could operate on it.&amp;nbsp; I get that this question was first asked 6 years ago, but hopefully this answer reveals similar issues that others may be encountering.&lt;/P&gt;&lt;P&gt;Transforms are applied in alphabetical order by the props name and in the order set in each transforms call.&lt;/P&gt;&lt;P&gt;The order set lists createsource first and instance second:&lt;/P&gt;&lt;PRE&gt;[tomcat-appl]
TRANSFORMS-set = createsource, instance&lt;/PRE&gt;&lt;P&gt;So, [createsource] changes the sourcetype so that the data no longer matches "tomcat-appl" for [instance] to apply to it.&lt;/P&gt;&lt;P&gt;Listing the props transforms calls separately follows the props name rule, where props are called in alphabetical order by prop names:&lt;/P&gt;&lt;PRE&gt;[tomcat-appl]
TRANSFORMS-instance_set = instance&lt;BR /&gt;TRANSFORMS-createsource_set = createsource&lt;/PRE&gt;&lt;P&gt;[createsource] starts with a "c", which is before the "i" of [instance].&amp;nbsp; So [createsource] applies first and changes the sourcetype so that [instance] cannot apply to the data (different sourcetype now).&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 00:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-one-transform-overriding-the-other-with-my-current/m-p/584412#M102870</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2022-02-10T00:36:36Z</dc:date>
    </item>
  </channel>
</rss>

