Back to Kibana

Generating event schema

x-pack/platform/plugins/shared/event_log/generated/README.md

9.4.01.0 KB
Original Source

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.

These files should not be edited by hand.

Please follow the following steps:

  1. Clone the 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/platform/plugins/shared/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/platform/plugins/shared/event_log/scripts/create_schemas.js