-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Event Log] Extend ECS event schema with fields needed for Detection …
…Engine (#95067) **Related to:** #94143 ## Summary This PR adds new fields to the schema (`EventSchema`, `IEvent`): - standard ECS fields: `error.*`, `event.*`, `log.level`, `log.logger`, `rule.*` - custom field set `kibana.detection_engine` We need these fields on the Detections side to implement detection rule execution log. See the related proposal (#94143) for more details. Also, this PR bumps ECS used in Event Log from `1.6.0` to the current `1.8.0` version. They are 100% same in terms of fields used in Event Log, so no changes in the schema were caused by this version increment.
- Loading branch information
Showing
7 changed files
with
519 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
# Generating event schema | ||
|
||
The files in this directory were generated by manually running the script | ||
../scripts/create-schemas.js from the root directory of the repository. | ||
`../scripts/create-schemas.js` from the root directory of the repository. | ||
|
||
These files should not be edited by hand. | ||
**These files should not be edited by hand.** | ||
|
||
Please follow the following steps: | ||
1. clone the [ECS](https://github.com/elastic/ecs) repo locally so that it resides along side your kibana repo, and checkout the ECS version you wish to support (for example, the `1.6` branch, for version 1.6) | ||
2. In the `x-pack/plugins/event_log/scripts/mappings.js` file you'll want to make th efollowing changes: | ||
1. Update `EcsKibanaExtensionsMappings` to include the mapping of the fields you wish to add. | ||
2. Update `EcsEventLogProperties` to include the fields in the generated mappings.json. | ||
3. cd to the `kibana` root folder and run: `node ./x-pack/plugins/event_log/scripts/create_schemas.js` | ||
|
||
1. Clone the [ECS](https://github.com/elastic/ecs) repo locally so that it | ||
resides along side your kibana repo, and checkout the ECS version you wish to | ||
support (for example, the `1.8` branch, for version 1.8). | ||
|
||
2. In the `x-pack/plugins/event_log/scripts/mappings.js` file you'll want to | ||
make the following changes: | ||
- Update `EcsCustomPropertyMappings` to include the mapping of the custom | ||
fields you wish to add. | ||
- Update `EcsPropertiesToGenerate` to include the fields in the generated | ||
`mappings.json`. | ||
- Make sure to list all array fields in `EcsEventLogMultiValuedProperties`. | ||
|
||
3. Cd to the `kibana` root folder and run: | ||
|
||
```sh | ||
node ./x-pack/plugins/event_log/scripts/create_schemas.js | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.