Generate full Beats field definitions, including nested fields#379
Generate full Beats field definitions, including nested fields#379webmat merged 11 commits intoelastic:masterfrom
Conversation
This also fixes a bug where the `group` fieldset was not actually being nested in all places where user is nested (e.g. `source.user.group.*`).
c16c812 to
f146f11
Compare
|
@ruflin Could you check this out? A big difference between this file and the previous one we crafted manually (other than the YAML rendering of strings) is that fields no longer are in the original order. If that's good with you for this, I think this is ready for final review. |
7c6a7c3 to
6f6efb7
Compare
|
Fields listed under each |
If it's not being used then I'd drop it. |
andrewkroh
left a comment
There was a problem hiding this comment.
LGTM. I looked over the generated fields.ecs.yml. This is nice. I didn't spend much time on the Python.
|
It's a Rubyist's Python, so probably better like that 😆 |
|
@ruflin Will ping you on the backport for review on Monday. Happy to adjust anything needed. But I'm moving forward here to prepare the 1.0 backport of this, then make elastic/beats#11150 final, so it can hopefully be merged Monday. |
…ncluding nested fields (elastic#379) Backport of PR elastic#379 to 1.0 branch. Original message: This work has revealed a subtle bug in the generated files schema.csv and both ES templates, which were missing the group fieldset in all places where user is reused. (e.g. `host.user.group.*`) Upon comparing this new file to the fields definition file we had handcrafted for Beats (prior to this), it also revealed we had missed a few things in the Beats field definitions: - We had forgotten to define the reusable `user` fieldset `client`, `destination`, `server` and `source`. They previously had been missed. - We had forgotten to define the reusable `geo` fieldset at `host.geo.*` and `observer.geo.*`
…g nested fields (#379) (#381) Backport of PR #379 to 1.0 branch. Original message: This work has revealed a subtle bug in the generated files schema.csv and both ES templates, which were missing the group fieldset in all places where user is reused. (e.g. `host.user.group.*`) Upon comparing this new file to the fields definition file we had handcrafted for Beats (prior to this), it also revealed we had missed a few things in the Beats field definitions: - We had forgotten to define the reusable `user` fieldset in `client`, `destination`, `server` and `source`. They previously had been missed. - We had forgotten to define the reusable `geo` fieldset at `host.geo.*` and `observer.geo.*`
This work has revealed a subtle bug in the generated files schema.csv and both ES templates, which were missing the
groupfieldset in all places whereuseris reused. (e.g.host.user.group.*)Notes
reusable). This new generator will filter them, to let through only what matters. Question: should we let through the ECSlevel?