Off the top of my head, EXTRACT s (in props.conf ) are done first, then REPORT s are evaluated. (Both of these can take a "class" name, which is simply sorted in lexagrapical order.) Of course, another simple way to assure fields are extracted in the proper order like this is to list out both extractions in the order you want them using a single REPORT entry, like so:
props.conf :
[my_sourcetype]
REPORT-myfield = fields1, fields2
transforms.conf :
[fields1]
REGEX = (?<field1.) .... (?<field4>...)
[fields2]
SOURCE_KEY = field4
REGEX = (?<field5>) .... (?<field8>)
In this example, "fields1" will always be evaluated before "fields2". Does that help? (If not, please provide some sample events and the related props.conf and transforms.conf .)
Update:
Based on your updated example, this is one solution that should work: (Assuming all your regex and everything else is fine, I didn't look that closely; and without sample event's it's hard to say anyways.)
[cloudfront_http]
REPORT-cloudfront = cloudfront-cdn-http, cdn-uri-v1, cdn-page-v1
The answer provided by southeringtonp should work fine too. It really comes down to your preference. If you had a more complex situation (For example, if "cdn_uri" could be found by two different field extractions based on variations in your events, then it would certainly be better to go with the explicit priority approach that southeringtonp pointed out.), but as is, either should work fine.
... View more