The short answer is that you changed the sourcetype before your [instance] transform could operate on it. I get that this question was first asked 6 years ago, but hopefully this answer reveals similar issues that others may be encountering. Transforms are applied in alphabetical order by the props name and in the order set in each transforms call. The order set lists createsource first and instance second: [tomcat-appl]
TRANSFORMS-set = createsource, instance So, [createsource] changes the sourcetype so that the data no longer matches "tomcat-appl" for [instance] to apply to it. Listing the props transforms calls separately follows the props name rule, where props are called in alphabetical order by prop names: [tomcat-appl]
TRANSFORMS-instance_set = instance TRANSFORMS-createsource_set = createsource [createsource] starts with a "c", which is before the "i" of [instance]. So [createsource] applies first and changes the sourcetype so that [instance] cannot apply to the data (different sourcetype now).
... View more