-
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.
Merge branch 'main' into adding-expanded-rows-to-pattern-analysis-table
- Loading branch information
Showing
132 changed files
with
4,772 additions
and
560 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
.buildkite/scripts/pipelines/security_solution_ess/pipeline.sh
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
echo "Inside the security solution pipeline" |
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
Validating CODEOWNERS rules …
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
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# @kbn/data-stream-adapter | ||
|
||
Utility library for Elasticsearch data stream management. | ||
|
||
## DataStreamAdapter | ||
|
||
Manage single data streams. Example: | ||
|
||
``` | ||
// Setup | ||
const dataStream = new DataStreamAdapter('my-awesome-datastream', { kibanaVersion: '8.12.1' }); | ||
dataStream.setComponentTemplate({ | ||
name: 'awesome-component-template', | ||
fieldMap: { | ||
'awesome.field1: { type: 'keyword', required: true }, | ||
'awesome.nested.field2: { type: 'number', required: false }, | ||
// ... | ||
}, | ||
}); | ||
dataStream.setIndexTemplate({ | ||
name: 'awesome-index-template', | ||
componentTemplateRefs: ['awesome-component-template', 'ecs-component-template'], | ||
template: { | ||
lifecycle: { | ||
data_retention: '5d', | ||
}, | ||
}, | ||
}); | ||
// Start | ||
await dataStream.install({ logger, esClient, pluginStop$ }); // Installs templates and the data stream, or updates existing. | ||
``` | ||
|
||
|
||
## DataStreamSpacesAdapter | ||
|
||
Manage data streams per space. Example: | ||
|
||
``` | ||
// Setup | ||
const spacesDataStream = new DataStreamSpacesAdapter('my-awesome-datastream', { kibanaVersion: '8.12.1' }); | ||
spacesDataStream.setComponentTemplate({ | ||
name: 'awesome-component-template', | ||
fieldMap: { | ||
'awesome.field1: { type: 'keyword', required: true }, | ||
'awesome.nested.field2: { type: 'number', required: false }, | ||
// ... | ||
}, | ||
}); | ||
spacesDataStream.setIndexTemplate({ | ||
name: 'awesome-index-template', | ||
componentTemplateRefs: ['awesome-component-template', 'ecs-component-template'], | ||
template: { | ||
lifecycle: { | ||
data_retention: '5d', | ||
}, | ||
}, | ||
}); | ||
// Start | ||
await spacesDataStream.install({ logger, esClient, pluginStop$ }); // Installs templates and updates existing data streams. | ||
// Create a space data stream on the fly | ||
await spacesDataStream.installSpace('space2'); // creates 'my-awesome-datastream-space2' data stream if it does not exist. | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
export { DataStreamAdapter } from './src/data_stream_adapter'; | ||
export { DataStreamSpacesAdapter } from './src/data_stream_spaces_adapter'; | ||
export { retryTransientEsErrors } from './src/retry_transient_es_errors'; | ||
export { ecsFieldMap, type EcsFieldMap } from './src/field_maps/ecs_field_map'; | ||
|
||
export type { | ||
DataStreamAdapterParams, | ||
SetComponentTemplateParams, | ||
SetIndexTemplateParams, | ||
InstallParams, | ||
} from './src/data_stream_adapter'; | ||
export * from './src/field_maps/types'; |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
module.exports = { | ||
preset: '@kbn/test', | ||
rootDir: '../..', | ||
roots: ['<rootDir>/packages/kbn-data-stream-adapter'], | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"type": "shared-common", | ||
"id": "@kbn/data-stream-adapter", | ||
"owner": "@elastic/security-threat-hunting-explore" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "@kbn/data-stream-adapter", | ||
"version": "1.0.0", | ||
"description": "Utility library for Elasticsearch Data Stream management", | ||
"license": "SSPL-1.0 OR Elastic License 2.0", | ||
"private": true | ||
} |
Oops, something went wrong.