<?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: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348428#M63991</link>
    <description>&lt;P&gt;source:: has precedence over sourcetype so the sourcetype stanza would be ignored.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.0.1/Admin/Attributeprecedencewithinafile"&gt;https://docs.splunk.com/Documentation/Splunk/7.0.1/Admin/Attributeprecedencewithinafile&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jan 2018 18:52:41 GMT</pubDate>
    <dc:creator>davpx</dc:creator>
    <dc:date>2018-01-29T18:52:41Z</dc:date>
    <item>
      <title>Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348427#M63990</link>
      <description>&lt;P&gt;I am thinking of merging a variety of sources being monitored by a Universal Forwarder into a single &lt;CODE&gt;sourcetype&lt;/CODE&gt; for indexing (and later searching) purposes. The sources each have specific pre-processing that needs to be done, and then a bunch of common processing that I can assign to the &lt;CODE&gt;sourcetype&lt;/CODE&gt; .&lt;/P&gt;

&lt;P&gt;Suppose I have a &lt;CODE&gt;[source::&amp;lt;source_spec&amp;gt;]&lt;/CODE&gt; stanza that specifies a number of &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; clauses and a &lt;CODE&gt;sourcetype = &amp;lt;common_sourcetype&amp;gt;&lt;/CODE&gt; clause, and also a &lt;CODE&gt;[&amp;lt;common_sourcetype&amp;gt;]&lt;/CODE&gt; stanza with its own &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; clauses. Will the source have both sets of &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; applied? Or will the first set be ignored because the &lt;CODE&gt;sourcetype&lt;/CODE&gt; clause "overrides" it?&lt;/P&gt;

&lt;P&gt;If I have a &lt;CODE&gt;force_local_processing = true&lt;/CODE&gt; clause in the &lt;CODE&gt;sourcetype&lt;/CODE&gt; stanza, will the Universal Forwarder also process the search-time &lt;CODE&gt;REPORT&lt;/CODE&gt; and &lt;CODE&gt;EXTRACT&lt;/CODE&gt; clauses? The &lt;CODE&gt;FIELDALIAS&lt;/CODE&gt;, &lt;CODE&gt;EVAL&lt;/CODE&gt;, &lt;CODE&gt;LOOKUP&lt;/CODE&gt; clauses? I suspect no on both counts.&lt;/P&gt;

&lt;P&gt;I know &lt;CODE&gt;SEDCMD&lt;/CODE&gt; clauses are applied at index-time, but are they applied before &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt;? Is the order in which they appear in a stanza significant?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 18:48:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348427#M63990</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-01-29T18:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348428#M63991</link>
      <description>&lt;P&gt;source:: has precedence over sourcetype so the sourcetype stanza would be ignored.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.0.1/Admin/Attributeprecedencewithinafile"&gt;https://docs.splunk.com/Documentation/Splunk/7.0.1/Admin/Attributeprecedencewithinafile&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 18:52:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348428#M63991</guid>
      <dc:creator>davpx</dc:creator>
      <dc:date>2018-01-29T18:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348429#M63992</link>
      <description>&lt;P&gt;Hi DUThibault,&lt;BR /&gt;
why do you want to use the same sourcetype for different sources?&lt;BR /&gt;
Related to sourcetype there are all the knowledge objects you have.&lt;/P&gt;

&lt;P&gt;For needs like the ones you described, I use a correct sourcetype for each kind of source and then I aggregate them using eventtypes and tags.&lt;BR /&gt;
In other words: I ingest audit logs from many different sources using an own sourcetype for each one.&lt;BR /&gt;
Then I create three eventtypes for each one filtering audit events, addressing the same tags: LOGIN, LOGOUT and LOGFAIL.&lt;BR /&gt;
In this way, calling tag=LOGIN I can find all the login events from many different kind of sources.&lt;/P&gt;

&lt;P&gt;I understand that this isn't a direct answer to your question, but I wanted to share my experience on this problem.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 19:37:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348429#M63992</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-01-29T19:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348430#M63993</link>
      <description>&lt;P&gt;You're not understanding my question. Say I have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::&amp;lt;some path&amp;gt;]
TRANSFORMS-a = some_transform
sourcetype = &amp;lt;some sourcetype&amp;gt;

[&amp;lt;some_sourcetype&amp;gt;]
TRANSFORMS-b = some_other_transform
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm hoping the events from &lt;CODE&gt;&amp;lt;some_path&amp;gt;&lt;/CODE&gt; will undergo &lt;CODE&gt;TRANSFORMS-a&lt;/CODE&gt;, receive the sourcetype &lt;CODE&gt;&amp;lt;some_sourcetype&amp;gt;&lt;/CODE&gt; and then (consequently) undergo &lt;CODE&gt;TRANSFORMS-b&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 19:40:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348430#M63993</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-01-29T19:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348431#M63994</link>
      <description>&lt;P&gt;Specifically, I'm trying to get additional data into Splunk_TA_linux. That app expects the sourcetypes linux:collectd:http:json and linux:collectd:graphite. Because those two channels are unavailable on the old system I'm running collectd on, I configured collectd to write log-like csv files instead, and I use a universal forwarder to watch those files and send them to my Splunk instance. Each of the collectd categories of logs produces a different stream of events which require a little bit of specialised transforms, but once these "preambles" are done there is a common set of transforms that remains to do. That's why I want to funnel a bunch of sourcetypes into a single one, which would mimic linux:collectd:graphite as far as values and metadata go. Once that is achieved, a final manipulation of the MetaData:Sourcetype key would relabel the events as linux:collectd:graphite and I'd be done.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:55:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348431#M63994</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2020-09-29T17:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348432#M63995</link>
      <description>&lt;P&gt;No, you can only go through the parsing phase once. The first will apply and the second will never match anything.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 20:25:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348432#M63995</guid>
      <dc:creator>davpx</dc:creator>
      <dc:date>2018-01-29T20:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348433#M63996</link>
      <description>&lt;P&gt;But if I look at &lt;CODE&gt;etc/system/default/props.conf&lt;/CODE&gt;, there is a &lt;CODE&gt;[source::.../syslog(.\d+)?]&lt;/CODE&gt; with a &lt;CODE&gt;sourcetype = syslog&lt;/CODE&gt; clause. Elsewhere in the file we find a &lt;CODE&gt;[syslog]&lt;/CODE&gt; stanza. Why is this if it'll never be matched?&lt;/P&gt;

&lt;P&gt;Are you saying that &lt;CODE&gt;source::&lt;/CODE&gt; can chain to &lt;CODE&gt;sourcetype&lt;/CODE&gt; but that only the first &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; clause present in either one gets to run?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 21:38:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348433#M63996</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-01-29T21:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348434#M63997</link>
      <description>&lt;P&gt;No they cannot be chained, You can modify the sourcetype later on in transforms and you can apply more than one transform to a props stanza by listing them out comma separated.&lt;/P&gt;

&lt;P&gt;When it comes to props, you can only match once. The example where [source::.../syslog(.\d+)?] implicitly matches any source where the file ends in a number. Those sources will take only this path through the parsing phase. Anything else already having the sourcetype of syslog via inputs will match the other stanza. &lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 22:00:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348434#M63997</guid>
      <dc:creator>davpx</dc:creator>
      <dc:date>2018-01-29T22:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348435#M63998</link>
      <description>&lt;P&gt;Let's take another look at &lt;CODE&gt;etc/system/default/props.conf&lt;/CODE&gt;. There is a &lt;CODE&gt;[syslog]&lt;/CODE&gt; stanza with nine clauses ( &lt;CODE&gt;pulldown_type&lt;/CODE&gt;, &lt;CODE&gt;maxDist&lt;/CODE&gt;, &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt;, &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt;, &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt;, &lt;CODE&gt;REPORT-syslog&lt;/CODE&gt;, &lt;CODE&gt;SHOULD_LINEMERGE&lt;/CODE&gt;, &lt;CODE&gt;category&lt;/CODE&gt;, &lt;CODE&gt;description&lt;/CODE&gt;), and there are four &lt;CODE&gt;source::&lt;/CODE&gt; stanzas ( &lt;CODE&gt;.../messages(.\d+)?&lt;/CODE&gt;, &lt;CODE&gt;.../syslog(.\d+)?&lt;/CODE&gt;, two more in &lt;CODE&gt;.../private/var/log&lt;/CODE&gt;) that consist of just the &lt;CODE&gt;sourcetype = syslog&lt;/CODE&gt; clause. If I declare &lt;CODE&gt;syslog(.\d+)?&lt;/CODE&gt; files as inputs without setting their &lt;CODE&gt;sourcetype&lt;/CODE&gt; (in &lt;CODE&gt;inputs.conf&lt;/CODE&gt;), the &lt;CODE&gt;source::&lt;/CODE&gt; stanza will match and all it will do is set the &lt;CODE&gt;sourcetype&lt;/CODE&gt;. None of the &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt;, etc. clauses will be applied. If, on the other hand, I do set the &lt;CODE&gt;sourcetype&lt;/CODE&gt;of &lt;CODE&gt;syslog(.\d+)?&lt;/CODE&gt; when I declare them as inputs, the &lt;CODE&gt;sourcetype&lt;/CODE&gt; stanza will kick in and the various clauses will apply. Either that or the &lt;CODE&gt;source::&lt;/CODE&gt; stanza will take precedence and we're back to the previous case. Additionally, the &lt;EM&gt;only&lt;/EM&gt; way to get the &lt;CODE&gt;sourcetype&lt;/CODE&gt; stanza to kick in would then be to have an input that does &lt;EM&gt;not&lt;/EM&gt; match any &lt;CODE&gt;source::&lt;/CODE&gt; stanza but which is assigned that &lt;CODE&gt;sourcetype&lt;/CODE&gt; manually. Doesn't sound right.&lt;/P&gt;

&lt;P&gt;Looking at &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.0.1/Admin/Propsconf"&gt;https://docs.splunk.com/Documentation/Splunk/7.0.1/Admin/Propsconf&lt;/A&gt; it is very clear that &lt;CODE&gt;props.conf&lt;/CODE&gt; does &lt;EM&gt;multiple&lt;/EM&gt; matches: all &lt;CODE&gt;source::&lt;/CODE&gt;, &lt;CODE&gt;sourcetype&lt;/CODE&gt;, &lt;CODE&gt;host::&lt;/CODE&gt;, &lt;CODE&gt;rule::&lt;/CODE&gt;, and &lt;CODE&gt;delayedrule::&lt;/CODE&gt; stanzas that match are applied. The &lt;CODE&gt;props.conf&lt;/CODE&gt; page explains in detail how conflicting clauses will be resolved both across stanza types and within a single stanza type. Further, &lt;CODE&gt;delayedrule::&lt;/CODE&gt; stanzas make sense only if, when they are triggered and an input receives a &lt;CODE&gt;sourcetype&lt;/CODE&gt; as a consequence, the &lt;CODE&gt;sourcetype&lt;/CODE&gt; stanza is then looked up and applied. That's what I mean by chaining.&lt;/P&gt;

&lt;P&gt;Please explain?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 16:19:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348435#M63998</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-01-30T16:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348436#M63999</link>
      <description>&lt;P&gt;"Additionally, the only way to get the sourcetype stanza to kick in would then be to have an input that does not match any source:: stanza but which is assigned that sourcetype manually. Doesn't sound right." - Yes&lt;/P&gt;

&lt;P&gt;Re - multiple matching categories, this is where precedence kicks in. They are not all applied, they are &lt;STRONG&gt;overridden&lt;/STRONG&gt; as you only get one pass through props.conf, meaning you cannot use props.conf to set a sourcetype from a source:: spec and expect that same data to be evaluated again at index time via the sourcetype stanza because there is no second pass through the parsing phase.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;**[&amp;lt;spec&amp;gt;] stanza precedence:**

For settings that are specified in multiple categories of matching [&amp;lt;spec&amp;gt;]
stanzas, [host::&amp;lt;host&amp;gt;] settings override [&amp;lt;sourcetype&amp;gt;] settings.
Additionally, [source::&amp;lt;source&amp;gt;] settings override both [host::&amp;lt;host&amp;gt;]
and [&amp;lt;sourcetype&amp;gt;] settings.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jan 2018 16:48:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348436#M63999</guid>
      <dc:creator>davpx</dc:creator>
      <dc:date>2018-01-30T16:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348437#M64000</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/175729"&gt;@DUThibault&lt;/a&gt; &lt;/P&gt;

&lt;P&gt;I hope understand your problem correctly. You have three different sources and need to perform own transforms . After that combine all the three sources and do the common transforms. I hope below thing would be helpful.&lt;/P&gt;

&lt;P&gt;[inux:collectd:http:json]&lt;BR /&gt;
TRANSFORMS-a = some_transform_1&lt;/P&gt;

&lt;P&gt;[inux:collectd:graphite]&lt;BR /&gt;
TRANSFORMS-b = some_transform_2&lt;/P&gt;

&lt;P&gt;[collectd]&lt;BR /&gt;
TRANSFORMS-c = some_transform_3&lt;/P&gt;

&lt;P&gt;[inux:collectd:http:json]&lt;BR /&gt;
rename = commoncollectd&lt;/P&gt;

&lt;P&gt;[inux:collectd:graphite]&lt;BR /&gt;
rename = commmoncollectd&lt;/P&gt;

&lt;P&gt;[collectd]&lt;BR /&gt;
rename = commmoncollectd&lt;/P&gt;

&lt;P&gt;[commoncollectd]&lt;BR /&gt;
Tranforms-common = some_transforms_common&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:52:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348437#M64000</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2020-09-29T17:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348438#M64001</link>
      <description>&lt;P&gt;When I read the props.conf page, my understanding is that &lt;EM&gt;clauses&lt;/EM&gt; override each other, not &lt;EM&gt;stanzas&lt;/EM&gt;. You seem to be saying that a source:: clause that sets sourcetype does not trigger the sourcetype stanza clauses (within the same, single props.conf parsing pass), which gets us back to the scenario I described where the particular way a file is inputted changes completely how it gets indexed and searched. What is the point of using a source:: stanza to set sourcetype if that gets completely ignored? Or even if the sourcetype kicks in only at search time, leaving the index-time clauses (TRANSFORMS) high and dry?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 17:14:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348438#M64001</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-01-30T17:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348439#M64002</link>
      <description>&lt;P&gt;I've spent the day testing Splunk 7.0.2 step by step, and here's what I found:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;1) (parsing time)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[source::]&lt;/CODE&gt; matching occurs whether or not &lt;CODE&gt;sourcetype&lt;/CODE&gt; is specified in &lt;CODE&gt;inputs.conf&lt;/CODE&gt;. If the input's &lt;CODE&gt;sourcetype&lt;/CODE&gt; is set only by a &lt;CODE&gt;[source::]&lt;/CODE&gt; stanza, the &lt;CODE&gt;[sourcetype]&lt;/CODE&gt; stanza nevertheless also fires.&lt;/P&gt;

&lt;P&gt;This happens on a Universal Forwarder (UF) if it has a &lt;CODE&gt;props.conf&lt;/CODE&gt; (absent by default) and the &lt;CODE&gt;[source::]&lt;/CODE&gt; or &lt;CODE&gt;[sourcetype]&lt;/CODE&gt; stanzas have a &lt;CODE&gt;force_local_processing = true&lt;/CODE&gt; clause (the props.conf page is incorrect when it states a &lt;CODE&gt;force_local_processing&lt;/CODE&gt; clause can only appear in a &lt;CODE&gt;[sourcetype]&lt;/CODE&gt; stanza: it also works with a &lt;CODE&gt;[source::]&lt;/CODE&gt; stanza). Parsing occurs only once, in the sense that if the UF parses and indexes the data, the indexer won't.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;2) (indexing time)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;SEDCMD&lt;/CODE&gt; and &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt;clauses fire at this time (in that order). For a &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; to have any effect, it must have a &lt;CODE&gt;WRITE_META = true&lt;/CODE&gt; or &lt;CODE&gt;DEST_KEY = _meta&lt;/CODE&gt; clause. This happens on a UF under the conditions outlined above, preventing the indexer clauses from firing.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;3) (search time)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;A &lt;CODE&gt;[sourcetype] rename&lt;/CODE&gt; clause kicks in first. Then any &lt;CODE&gt;REPORT&lt;/CODE&gt; and &lt;CODE&gt;EXTRACT&lt;/CODE&gt; clauses fire. Note that &lt;CODE&gt;REPORT&lt;/CODE&gt; and &lt;CODE&gt;EXTRACT&lt;/CODE&gt; can never occur on a UF.&lt;/P&gt;

&lt;P&gt;To be complete, &lt;CODE&gt;EXTRACT&lt;/CODE&gt; happens first, then &lt;CODE&gt;REPORT&lt;/CODE&gt;, then automatic key-value extraction, then &lt;CODE&gt;FIELDALIAS&lt;/CODE&gt;, then &lt;CODE&gt;EVAL&lt;/CODE&gt; (in parallel), and finally &lt;CODE&gt;LOOKUP&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;The rules of precedence (e.g. &lt;CODE&gt;[source::]&lt;/CODE&gt; overrides &lt;CODE&gt;[sourcetype]&lt;/CODE&gt;) matter &lt;EM&gt;only&lt;/EM&gt; if the clauses have the same classes. That is to say, if they have identical keys. Thus, a &lt;CODE&gt;[source::] SEDCMD-one&lt;/CODE&gt; clause and a &lt;CODE&gt;[sourcetype] SEDCMD-two&lt;/CODE&gt; clause would both fire (in &lt;CODE&gt;one&lt;/CODE&gt;, &lt;CODE&gt;two&lt;/CODE&gt; order, because they're sorted using &lt;CODE&gt;class&lt;/CODE&gt;).&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 21:35:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348439#M64002</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-01-30T21:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348440#M64003</link>
      <description>&lt;P&gt;Solution in progress:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;inputs.conf&lt;/STRONG&gt; (on the Universal Forwarder)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# cpu-&amp;lt;number&amp;gt;/cpu-(idle|interrupt|nice|softirq|steal|system|user|wait)-&amp;lt;timestamp&amp;gt;
[monitor:///var/collectd/csv/*/cpu-*/cpu-*]
disabled = false
index = forwarders_index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt; (on the Universal Forwarder)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# .../csv/&amp;lt;host&amp;gt;.&amp;lt;domain&amp;gt;/cpu-&amp;lt;number&amp;gt;/cpu-(idle|interrupt|nice|softirq|steal|system|user|wait)-&amp;lt;timestamp&amp;gt;
[source::.../csv/host.domain/cpu-*/cpu-*]
# epoch,value
# 1516683601,362505306
force_local_processing = true
# &amp;lt;host&amp;gt;.cpu-&amp;lt;number&amp;gt;.cpu-(idle|interrupt|nice|softirq|steal|system|user|wait).value \2 \1
SEDCMD-swap = s/^(\d+),(\d+)/\2 \1/
TRANSFORMS-skipheader = transform-skipheader-epoch-value
TRANSFORMS-build-raw = transform-cpu-prefix
sourcetype = linux:collectd:graphite
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;  (on the Universal Forwarder)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[transform-skipheader-epoch-value]
REGEX = epoch,value
DEST_KEY = queue
FORMAT = nullQueue

[transform-cpu-prefix]
SOURCE_KEY = MetaData:Source
# .../csv/&amp;lt;host&amp;gt;.&amp;lt;domain&amp;gt;/cpu-&amp;lt;number&amp;gt;/cpu-(idle|interrupt|nice|softirq|steal|system|user|wait)-&amp;lt;timestamp&amp;gt;
REGEX = ^.*/csv/([^./]+)[^/]*/cpu-([0-9]+)/cpu-([a-z]+)-[0-9]{4}-[0-9]{2}-[0-9]{2}$
DEST_KEY = _raw
# &amp;lt;host&amp;gt;.cpu-&amp;lt;number&amp;gt;.cpu-(idle|interrupt|nice|softirq|steal|system|user|wait).value \1 \2
FORMAT = $1.cpu-$2.cpu-$3.value $0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The same approach applies to the other categories of collectd data.&lt;/P&gt;

&lt;P&gt;And my Splunk instance receives &lt;CODE&gt;linux:collectd:graphite&lt;/CODE&gt; events formatted just like they should be.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 19:39:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348440#M64003</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-02-01T19:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348441#M64004</link>
      <description>&lt;P&gt;The simple answer is: yes. All of the matching stanzas will apply, merging the various clauses.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Suppose I have a &lt;CODE&gt;[source::&amp;lt;source_spec&amp;gt;]&lt;/CODE&gt; stanza that specifies a number of &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; clauses&lt;BR /&gt;
and a &lt;CODE&gt;sourcetype = &amp;lt;common_sourcetype&amp;gt;&lt;/CODE&gt; clause, and also a &lt;CODE&gt;[&amp;lt;common_sourcetype&amp;gt;]&lt;/CODE&gt; stanza with&lt;BR /&gt;
its own &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; clauses. Will the source have both sets of &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; applied? Or will the&lt;BR /&gt;
first set be ignored because the sourcetype clause "overrides" it?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Both sets of &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; will apply.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;If I have a &lt;CODE&gt;force_local_processing = true&lt;/CODE&gt; clause in the &lt;CODE&gt;sourcetype&lt;/CODE&gt; stanza, will the Universal&lt;BR /&gt;
Forwarder also process the search-time &lt;CODE&gt;REPORT&lt;/CODE&gt; and &lt;CODE&gt;EXTRACT&lt;/CODE&gt; clauses? The &lt;CODE&gt;FIELDALIAS&lt;/CODE&gt;, &lt;CODE&gt;EVAL&lt;/CODE&gt;,&lt;BR /&gt;
&lt;CODE&gt;LOOKUP&lt;/CODE&gt; clauses? I suspect no on both counts.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;No, a Universal Forwarder will never intervene past index time, so any "local processing" &lt;CODE&gt;REPORT&lt;/CODE&gt;, &lt;CODE&gt;EXTRACT&lt;/CODE&gt;, &lt;CODE&gt;FIELDALIAS&lt;/CODE&gt;, etc., will be ignored.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;I know &lt;CODE&gt;SEDCMD&lt;/CODE&gt; clauses are applied at index-time, but are they applied before &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt;?&lt;BR /&gt;
Is the order in which they appear in a stanza significant?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;CODE&gt;SEDCMD&lt;/CODE&gt; clauses apply first; however, if a &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; clause then changes the &lt;CODE&gt;sourcetype&lt;/CODE&gt;, the new sourcetype's &lt;CODE&gt;SEDCMD&lt;/CODE&gt; clause would be applied once the sourcetype-changing &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; clause is complete.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 15:18:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348441#M64004</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-02-05T15:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348442#M64005</link>
      <description>&lt;P&gt;See &lt;A href="https://answers.splunk.com/answers/615924/"&gt;https://answers.splunk.com/answers/615924/&lt;/A&gt; for the rest of the solution.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 15:19:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/348442#M64005</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-02-05T15:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/589569#M103381</link>
      <description>&lt;P&gt;Yes, remember the ONE PASS rule an even goes thru ONCE based on highest precedence , you can CLONE_SOURCETYPE to create another event and have a second go ....&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 18:40:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/589569#M103381</guid>
      <dc:creator>mwk1000</dc:creator>
      <dc:date>2022-03-17T18:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Do TRANSFORMS in a source stanza and a sourcetype stanza both apply?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/589571#M103382</link>
      <description>&lt;P class="lia-align-left"&gt;One pass rule - NO it will apply the source:: if it matches ...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 18:42:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Do-TRANSFORMS-in-a-source-stanza-and-a-sourcetype-stanza-both/m-p/589571#M103382</guid>
      <dc:creator>mwk1000</dc:creator>
      <dc:date>2022-03-17T18:42:29Z</dc:date>
    </item>
  </channel>
</rss>

