You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -192,6 +193,41 @@ Include can be used together with the `--ref` flag to merge custom fields into a
192
193
193
194
> NOTE: The `--include` mechanism will not validate custom YAML files prior to merging. This allows for modifying existing ECS fields in a custom schema without having to redefine all the mandatory field attributes.
194
195
196
+
#### Exclude
197
+
198
+
Use the `--exclude` flag to generate ephemeral ECS artifacts based on the current ECS schema field definitions minus fields considered for removal, e.g. to assess impact of removing these. Warning! This is not the recommended route to remove a field permanently as it is not intentended to be invoked during the build process. Definitive field removal should be implemented using a custom [Subset](#subset) or via the [RFC process](https://github.com/elastic/ecs/tree/master/rfcs/README.md). Example:
The `--exclude` flag expects a path to one or more YAML files using the same [file format](https://github.com/elastic/ecs/tree/master/schemas#fields-supported-in-schemasyml) as the ECS schema files. You can also use a subset, provided that relevant `name` and `fields` fields are preserved.
206
+
207
+
```
208
+
---
209
+
- name: log
210
+
fields:
211
+
- name: original
212
+
```
213
+
214
+
The root Field Set `name` must always be present and specified with no dots `.`. Subfields may be specified using dot notation, for example:
215
+
216
+
```
217
+
---
218
+
- name: log
219
+
fields:
220
+
- name: syslog.severity.name
221
+
```
222
+
223
+
Generate artifacts using `--exclude` to load our custom definitions in addition to `--out` to place them in the desired output directory:
If your indices will never populate particular ECS fields, there's no need to include those field definitions in your index mappings. The `--subset` argument allows for passing a subset definition YAML file which indicates which field sets or specific fields to include in the generated artifacts.
0 commit comments