|
I am trying to do the following:
This all works perfectly. the fields are fully available at search time. But now comes the tricky part.
Unfortunately, this does not work. I have checked the regexp using REX and that works fine. Are there any special rules to consider when doing nested transforms & extractions? UDPATE #1 Here are the relevant contents of my ./apps/search/local/transforms.conf
And here are the relevant chunk of my ./apps/search/local/props.conf that extracts the three transforms
|
|
Off the top of my head,
In this example, "fields1" will always be evaluated before "fields2". Does that help? (If not, please provide some sample events and the related 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.)
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. |
|
As Lowell indicated, lexical order is important when doing multiple tiers of transform. Often a good practice is to add a number to the extraction's tag to help ensure that the sort order is clear, like so:
Also, be careful with characters like dashes and underscores when sort order matters. Your example uses both REPORT-couldfront-xxx and REPORT-cloudfront_xxx. It's a good idea to keep those consistent, or better yet rely just on alphanumeric sort. Assuming normal ASCII sort, a dash comes before an underscore, but that might vary if Splunk honors sort orders for different locales. Thanks. That did the tricks. I inserted the numbers into the report names to force the sort order.
(17 Jan '11, 20:46)
jcbrendsel
|
