Like @David said, props/transforms.conf is the way to go. From the docs on using props.conf only extractions:
All extraction configurations in props.conf are restricted by a specific source, source type, or host. Start by identifying the source type, source, or host that provide the events that your field should be extracted from
Also from the docs on transforms.conf extractions:
Your search-time field extractions require a field transform component if you need to:
• Reuse the same field-extracting regular expression across multiple sources, source types, or hosts (in other words, configure one field transform for multiple field extractions). If you find yourself using the same regex to extract fields for different sources, source types, and hosts, you may want to set it up as a transform. Then, if you find that you need to update the regex, you only have to do so once, even though it is used more than one field extraction.
So you can't wildcard the sourcetype. To dowhat you want while making maintenance easy, create a field transform in transforms.conf and reference it in props.conf for each host/source/sourcetype to which it applies:
transforms.conf:
[myNewFieldExtract]
REGEX = instances\/(?<NewFieldName>[^\/]+)
SOURCE_KEY = source
props.conf:
[sourcetype::first_sourcetype_this_applies_to]
REPORT-my_class_name = myNewFieldExtract
[sourcetype::second_sourcetype_this_applies_to]
REPORT-my_class_name = myNewFieldExtract
... and so on...
... View more