Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Response Ops][Alerting] Update common component template generation for framework alerts as data #150384

Merged
merged 83 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
1ad0848
wip
ymao1 Feb 6, 2023
2197c3e
Splitting technical fields into default and legacy. Removing the fiel…
ymao1 Feb 6, 2023
a0b331d
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 7, 2023
f24a0be
Removing rule registry FieldMap and mappingFromFieldMap in favor of a…
ymao1 Feb 7, 2023
a5d0b5d
Need to double check alerts client typing
ymao1 Feb 7, 2023
c8b6027
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 7, 2023
851b779
trying to fix distribution issue
ymao1 Feb 7, 2023
f6799fd
Merge branch 'alerting/faad-resources-common' of github.com:ymao1/kib…
ymao1 Feb 7, 2023
085b7b8
testing revert
ymao1 Feb 7, 2023
2ca888c
unbelievable
ymao1 Feb 7, 2023
b5b5b1a
Fixing tests
ymao1 Feb 8, 2023
d8c2acf
Fixing tests
ymao1 Feb 8, 2023
ea01b73
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 8, 2023
e738874
Building technical field map from legacy and framework alert field map
ymao1 Feb 8, 2023
a7425b3
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 8, 2023
8fa924a
Building technical field map from legacy and framework alert field map
ymao1 Feb 8, 2023
15af36c
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 8, 2023
f54aefe
parameters have to be flattened
ymao1 Feb 8, 2023
98f957b
Installing legacy alert component template on startup
ymao1 Feb 8, 2023
65b24e4
Referencing legacy alert template when specified
ymao1 Feb 8, 2023
9055fc2
Adding ecs field map and installing ecs component template
ymao1 Feb 9, 2023
4ced657
Merging in main
ymao1 Feb 9, 2023
23b5bc7
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 9, 2023
3444c8d
Fixing functional test
ymao1 Feb 10, 2023
6cf91a7
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 10, 2023
e1590dc
Merge branch 'alerting/faad-resources-common' of github.com:ymao1/kib…
ymao1 Feb 10, 2023
cbfead1
Adding flag to allow rule types to use ecs component template
ymao1 Feb 10, 2023
6fe2c54
Merging in main
ymao1 Feb 13, 2023
482a435
Trying to control bundle size
ymao1 Feb 13, 2023
b78b881
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Feb 13, 2023
031f0a4
Moving field maps to packages
ymao1 Feb 13, 2023
57ecb44
Merge branch 'alerting/faad-resources-common' of github.com:ymao1/kib…
ymao1 Feb 13, 2023
cadc717
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 13, 2023
727dcd8
Merging in main
ymao1 Feb 14, 2023
5e6b995
Fixing types
ymao1 Feb 14, 2023
b5bc473
Merge branch 'alerting/faad-resources-common' of github.com:ymao1/kib…
ymao1 Feb 14, 2023
c828e61
Moving to a new package
ymao1 Feb 14, 2023
30d9848
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 14, 2023
27d63d1
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 14, 2023
98a34fa
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Feb 14, 2023
c60177a
Fixing checks
ymao1 Feb 14, 2023
b9963d2
Merge branch 'alerting/faad-resources-common' of github.com:ymao1/kib…
ymao1 Feb 14, 2023
dc311d9
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 14, 2023
5d6f656
Fixing checks
ymao1 Feb 14, 2023
7cfef7d
Merge branch 'alerting/faad-resources-common' of github.com:ymao1/kib…
ymao1 Feb 14, 2023
089807f
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 14, 2023
6d00d49
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Feb 14, 2023
539b4c3
cleanup
ymao1 Feb 15, 2023
5e6f7cf
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 15, 2023
0642883
Merge branch 'alerting/faad-resources-common' of github.com:ymao1/kib…
ymao1 Feb 15, 2023
52dfd19
cleanup
ymao1 Feb 15, 2023
0715cd1
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 15, 2023
88a0ea7
Conditionally installing ECS component template. Updating to use same…
ymao1 Feb 15, 2023
de819fc
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 15, 2023
29e26ea
Fixing types
ymao1 Feb 15, 2023
2cf0113
Merge branch 'alerting/faad-resources-common' of github.com:ymao1/kib…
ymao1 Feb 15, 2023
044018e
Not using multi_field
ymao1 Feb 15, 2023
8431ca0
Fixing functional test
ymao1 Feb 15, 2023
e5379a2
Removing index and doc values fields
ymao1 Feb 15, 2023
1bb3c88
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 15, 2023
d4201df
Keeping rule registry ecsFieldMap for now
ymao1 Feb 16, 2023
2345eba
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 16, 2023
f311523
temporarily updating ecs_flat and upping field limit
ymao1 Feb 16, 2023
96450fd
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 16, 2023
08885e8
Merge branch 'alerting/faad-resources-common' of github.com:ymao1/kib…
ymao1 Feb 16, 2023
ab6977f
wip
ymao1 Feb 16, 2023
54c7aa8
Updating index template field mapping limit on error and retrying com…
ymao1 Feb 16, 2023
6c894c9
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 16, 2023
19d5c96
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Feb 16, 2023
2629c31
Merge branch 'main' into alerting/faad-resources-common
kibanamachine Feb 21, 2023
75a8316
Merging in main
ymao1 Feb 21, 2023
6c5f875
Cleanup
ymao1 Feb 21, 2023
7e5f5d3
Merge branch 'main' of github.com:elastic/kibana into alerting/faad-r…
ymao1 Feb 21, 2023
9e77b99
Update x-pack/plugins/alerting/server/alerts_service/types.ts
ymao1 Feb 21, 2023
c773f3c
Merge branch 'main' into alerting/faad-resources-common
kibanamachine Feb 22, 2023
8e15fe9
Merging in main
ymao1 Feb 22, 2023
6d97dfa
Merging in main
ymao1 Feb 22, 2023
b9ac0f4
Restoring multi_fields
ymao1 Feb 22, 2023
84d867b
Merging in main
ymao1 Feb 22, 2023
1587689
Merge branch 'main' into alerting/faad-resources-common
kibanamachine Feb 24, 2023
9069f77
Merge branch 'main' into alerting/faad-resources-common
kibanamachine Feb 27, 2023
18854e2
Merge branch 'main' into alerting/faad-resources-common
kibanamachine Feb 27, 2023
af0428e
Merge branch 'main' into alerting/faad-resources-common
kibanamachine Feb 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/kbn-rule-data-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

export * from './src/default_alerts_as_data';
export * from './src/legacy_alerts_as_data';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default_alerts_as_data contains the fields that end up in the .alerts-framework-mappings component template

legacy_alerts_as_data contains the fields that are in the .alerts-technical-mappings from the rule registry but are not in .alerts-framework-mappings

export * from './src/technical_field_names';
export * from './src/alerts_as_data_rbac';
export * from './src/alerts_as_data_severity';
Expand Down
32 changes: 25 additions & 7 deletions packages/kbn-rule-data-utils/src/default_alerts_as_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

import { ValuesType } from 'utility-types';

const TIMESTAMP = '@timestamp' as const;

// namespaces
const KIBANA_NAMESPACE = 'kibana' as const;
const ALERT_NAMESPACE = `${KIBANA_NAMESPACE}.alert` as const;
const ALERT_RULE_NAMESPACE = `${ALERT_NAMESPACE}.rule` as const;
Expand All @@ -21,6 +24,9 @@ const VERSION = `${KIBANA_NAMESPACE}.version` as const;
// kibana.alert.action_group - framework action group ID for this alert
const ALERT_ACTION_GROUP = `${ALERT_NAMESPACE}.action_group` as const;

// kibana.alert.case_ids - array of cases associated with the alert
const ALERT_CASE_IDS = `${ALERT_NAMESPACE}.case_ids` as const;

// kibana.alert.duration.us - alert duration in nanoseconds - updated each execution
// that the alert is active
const ALERT_DURATION = `${ALERT_NAMESPACE}.duration.us` as const;
Expand All @@ -31,8 +37,11 @@ const ALERT_END = `${ALERT_NAMESPACE}.end` as const;
// kibana.alert.flapping - whether the alert is currently in a flapping state
const ALERT_FLAPPING = `${ALERT_NAMESPACE}.flapping` as const;

// kibana.alert.id - alert ID, also known as alert instance ID
const ALERT_ID = `${ALERT_NAMESPACE}.id` as const;
// kibana.alert.flapping_history - whether the alert is currently in a flapping state
const ALERT_FLAPPING_HISTORY = `${ALERT_NAMESPACE}.flapping_history` as const;

// kibana.alert.instance.id - alert ID, also known as alert instance ID
const ALERT_INSTANCE_ID = `${ALERT_NAMESPACE}.instance.id` as const;

// kibana.alert.last_detected - timestamp when the alert was last seen
const ALERT_LAST_DETECTED = `${ALERT_NAMESPACE}.last_detected` as const;
Expand Down Expand Up @@ -90,10 +99,12 @@ const namespaces = {

const fields = {
ALERT_ACTION_GROUP,
ALERT_CASE_IDS,
ALERT_DURATION,
ALERT_END,
ALERT_FLAPPING,
ALERT_ID,
ALERT_FLAPPING_HISTORY,
ALERT_INSTANCE_ID,
ALERT_LAST_DETECTED,
ALERT_REASON,
ALERT_RULE_CATEGORY,
Expand All @@ -111,15 +122,24 @@ const fields = {
ALERT_UUID,
ALERT_WORKFLOW_STATUS,
SPACE_IDS,
TIMESTAMP,
VERSION,
};

export {
// namespaces
ALERT_NAMESPACE,
ALERT_RULE_NAMESPACE,
KIBANA_NAMESPACE,

// fields
ALERT_ACTION_GROUP,
ALERT_CASE_IDS,
ALERT_DURATION,
ALERT_END,
ALERT_FLAPPING,
ALERT_ID,
ALERT_FLAPPING_HISTORY,
ALERT_INSTANCE_ID,
ALERT_LAST_DETECTED,
ALERT_REASON,
ALERT_RULE_CATEGORY,
Expand All @@ -137,10 +157,8 @@ export {
ALERT_UUID,
ALERT_WORKFLOW_STATUS,
SPACE_IDS,
TIMESTAMP,
VERSION,
ALERT_NAMESPACE,
ALERT_RULE_NAMESPACE,
KIBANA_NAMESPACE,
};

export type DefaultAlertFieldName = ValuesType<typeof fields & typeof namespaces>;
84 changes: 84 additions & 0 deletions packages/kbn-rule-data-utils/src/legacy_alerts_as_data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
* 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.
*/

import { ALERT_NAMESPACE, ALERT_RULE_NAMESPACE } from './default_alerts_as_data';

const ECS_VERSION = 'ecs.version' as const;
const EVENT_ACTION = 'event.action' as const;
const EVENT_KIND = 'event.kind' as const;
const TAGS = 'tags' as const;

// These are the fields that are in the rule registry technical component template
// that are NOT in the framework alerts as data common component template

// We will maintain a legacy component template that can be used by legacy
// rule registry rules with these fields.
const ALERT_RISK_SCORE = `${ALERT_NAMESPACE}.risk_score` as const;
const ALERT_RULE_AUTHOR = `${ALERT_RULE_NAMESPACE}.author` as const;
const ALERT_RULE_CREATED_AT = `${ALERT_RULE_NAMESPACE}.created_at` as const;
const ALERT_RULE_CREATED_BY = `${ALERT_RULE_NAMESPACE}.created_by` as const;
const ALERT_RULE_DESCRIPTION = `${ALERT_RULE_NAMESPACE}.description` as const;
const ALERT_RULE_ENABLED = `${ALERT_RULE_NAMESPACE}.enabled` as const;
const ALERT_RULE_FROM = `${ALERT_RULE_NAMESPACE}.from` as const;
const ALERT_RULE_INTERVAL = `${ALERT_RULE_NAMESPACE}.interval` as const;
const ALERT_RULE_LICENSE = `${ALERT_RULE_NAMESPACE}.license` as const;
const ALERT_RULE_NOTE = `${ALERT_RULE_NAMESPACE}.note` as const;
const ALERT_RULE_REFERENCES = `${ALERT_RULE_NAMESPACE}.references` as const;
const ALERT_RULE_RULE_ID = `${ALERT_RULE_NAMESPACE}.rule_id` as const;
const ALERT_RULE_RULE_NAME_OVERRIDE = `${ALERT_RULE_NAMESPACE}.rule_name_override` as const;
const ALERT_RULE_TO = `${ALERT_RULE_NAMESPACE}.to` as const;
const ALERT_RULE_TYPE = `${ALERT_RULE_NAMESPACE}.type` as const;
const ALERT_RULE_UPDATED_AT = `${ALERT_RULE_NAMESPACE}.updated_at` as const;
const ALERT_RULE_UPDATED_BY = `${ALERT_RULE_NAMESPACE}.updated_by` as const;
const ALERT_RULE_VERSION = `${ALERT_RULE_NAMESPACE}.version` as const;
const ALERT_SEVERITY = `${ALERT_NAMESPACE}.severity` as const;
const ALERT_SUPPRESSION_META = `${ALERT_NAMESPACE}.suppression` as const;
const ALERT_SUPPRESSION_TERMS = `${ALERT_SUPPRESSION_META}.terms` as const;
const ALERT_SUPPRESSION_FIELD = `${ALERT_SUPPRESSION_TERMS}.field` as const;
const ALERT_SUPPRESSION_VALUE = `${ALERT_SUPPRESSION_TERMS}.value` as const;
const ALERT_SUPPRESSION_START = `${ALERT_SUPPRESSION_META}.start` as const;
const ALERT_SUPPRESSION_END = `${ALERT_SUPPRESSION_META}.end` as const;
const ALERT_SUPPRESSION_DOCS_COUNT = `${ALERT_SUPPRESSION_META}.docs_count` as const;
const ALERT_SYSTEM_STATUS = `${ALERT_NAMESPACE}.system_status` as const;
const ALERT_WORKFLOW_REASON = `${ALERT_NAMESPACE}.workflow_reason` as const;
const ALERT_WORKFLOW_USER = `${ALERT_NAMESPACE}.workflow_user` as const;

export {
ALERT_RISK_SCORE,
ALERT_RULE_AUTHOR,
ALERT_RULE_CREATED_AT,
ALERT_RULE_CREATED_BY,
ALERT_RULE_DESCRIPTION,
ALERT_RULE_ENABLED,
ALERT_RULE_FROM,
ALERT_RULE_INTERVAL,
ALERT_RULE_LICENSE,
ALERT_RULE_NOTE,
ALERT_RULE_REFERENCES,
ALERT_RULE_RULE_ID,
ALERT_RULE_RULE_NAME_OVERRIDE,
ALERT_RULE_TO,
ALERT_RULE_TYPE,
ALERT_RULE_UPDATED_AT,
ALERT_RULE_UPDATED_BY,
ALERT_RULE_VERSION,
ALERT_SEVERITY,
ALERT_SUPPRESSION_DOCS_COUNT,
ALERT_SUPPRESSION_END,
ALERT_SUPPRESSION_FIELD,
ALERT_SUPPRESSION_START,
ALERT_SUPPRESSION_TERMS,
ALERT_SUPPRESSION_VALUE,
ALERT_SYSTEM_STATUS,
ALERT_WORKFLOW_REASON,
ALERT_WORKFLOW_USER,
ECS_VERSION,
EVENT_ACTION,
EVENT_KIND,
TAGS,
};
121 changes: 45 additions & 76 deletions packages/kbn-rule-data-utils/src/technical_field_names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@

import { ValuesType } from 'utility-types';
import {
ALERT_NAMESPACE,
ALERT_RULE_NAMESPACE,
KIBANA_NAMESPACE,
ALERT_ACTION_GROUP,
ALERT_CASE_IDS,
ALERT_DURATION,
ALERT_END,
ALERT_FLAPPING,
ALERT_INSTANCE_ID,
ALERT_REASON,
ALERT_RULE_CATEGORY,
ALERT_RULE_CONSUMER,
Expand All @@ -29,61 +33,61 @@ import {
ALERT_UUID,
ALERT_WORKFLOW_STATUS,
SPACE_IDS,
TIMESTAMP,
VERSION,
ALERT_NAMESPACE,
ALERT_RULE_NAMESPACE,
} from './default_alerts_as_data';

import {
ALERT_RISK_SCORE,
ALERT_RULE_AUTHOR,
ALERT_RULE_CREATED_AT,
ALERT_RULE_CREATED_BY,
ALERT_RULE_DESCRIPTION,
ALERT_RULE_ENABLED,
ALERT_RULE_FROM,
ALERT_RULE_INTERVAL,
ALERT_RULE_LICENSE,
ALERT_RULE_NOTE,
ALERT_RULE_REFERENCES,
ALERT_RULE_RULE_ID,
ALERT_RULE_RULE_NAME_OVERRIDE,
ALERT_RULE_TO,
ALERT_RULE_TYPE,
ALERT_RULE_UPDATED_AT,
ALERT_RULE_UPDATED_BY,
ALERT_RULE_VERSION,
ALERT_SEVERITY,
ALERT_SUPPRESSION_DOCS_COUNT,
ALERT_SUPPRESSION_END,
ALERT_SUPPRESSION_FIELD,
ALERT_SUPPRESSION_START,
ALERT_SUPPRESSION_TERMS,
ALERT_SUPPRESSION_VALUE,
ALERT_SYSTEM_STATUS,
ALERT_WORKFLOW_REASON,
ALERT_WORKFLOW_USER,
ECS_VERSION,
EVENT_ACTION,
EVENT_KIND,
TAGS,
} from './legacy_alerts_as_data';

// The following fields were identified as technical field names but were not defined in the
// rule registry technical component template. We will leave these here for backwards
// compatibility but these consts should be moved to the plugin that uses them

const ALERT_RULE_THREAT_NAMESPACE = `${ALERT_RULE_NAMESPACE}.threat` as const;

const ECS_VERSION = 'ecs.version' as const;
const EVENT_ACTION = 'event.action' as const;
const EVENT_KIND = 'event.kind' as const;
const EVENT_MODULE = 'event.module' as const;
const TAGS = 'tags' as const;
const TIMESTAMP = '@timestamp' as const;

// Fields pertaining to the alert
const ALERT_BUILDING_BLOCK_TYPE = `${ALERT_NAMESPACE}.building_block_type` as const;
const ALERT_EVALUATION_THRESHOLD = `${ALERT_NAMESPACE}.evaluation.threshold` as const;
const ALERT_EVALUATION_VALUE = `${ALERT_NAMESPACE}.evaluation.value` as const;
const ALERT_INSTANCE_ID = `${ALERT_NAMESPACE}.instance.id` as const;
const ALERT_RISK_SCORE = `${ALERT_NAMESPACE}.risk_score` as const;
const ALERT_SEVERITY = `${ALERT_NAMESPACE}.severity` as const;
const ALERT_SYSTEM_STATUS = `${ALERT_NAMESPACE}.system_status` as const;
const ALERT_WORKFLOW_REASON = `${ALERT_NAMESPACE}.workflow_reason` as const;
const ALERT_WORKFLOW_USER = `${ALERT_NAMESPACE}.workflow_user` as const;
const ALERT_SUPPRESSION_META = `${ALERT_NAMESPACE}.suppression` as const;
const ALERT_SUPPRESSION_TERMS = `${ALERT_SUPPRESSION_META}.terms` as const;
const ALERT_SUPPRESSION_FIELD = `${ALERT_SUPPRESSION_TERMS}.field` as const;
const ALERT_SUPPRESSION_VALUE = `${ALERT_SUPPRESSION_TERMS}.value` as const;
const ALERT_SUPPRESSION_START = `${ALERT_SUPPRESSION_META}.start` as const;
const ALERT_SUPPRESSION_END = `${ALERT_SUPPRESSION_META}.end` as const;
const ALERT_SUPPRESSION_DOCS_COUNT = `${ALERT_SUPPRESSION_META}.docs_count` as const;

// Fields pertaining to the cases associated with the alert
const ALERT_CASE_IDS = `${ALERT_NAMESPACE}.case_ids` as const;

// Fields pertaining to the rule associated with the alert
const ALERT_RULE_AUTHOR = `${ALERT_RULE_NAMESPACE}.author` as const;
const ALERT_RULE_CREATED_AT = `${ALERT_RULE_NAMESPACE}.created_at` as const;
const ALERT_RULE_CREATED_BY = `${ALERT_RULE_NAMESPACE}.created_by` as const;
const ALERT_RULE_DESCRIPTION = `${ALERT_RULE_NAMESPACE}.description` as const;
const ALERT_RULE_ENABLED = `${ALERT_RULE_NAMESPACE}.enabled` as const;
const ALERT_RULE_EXCEPTIONS_LIST = `${ALERT_RULE_NAMESPACE}.exceptions_list` as const;
const ALERT_RULE_FROM = `${ALERT_RULE_NAMESPACE}.from` as const;
const ALERT_RULE_INTERVAL = `${ALERT_RULE_NAMESPACE}.interval` as const;
const ALERT_RULE_LICENSE = `${ALERT_RULE_NAMESPACE}.license` as const;
const ALERT_RULE_NAMESPACE_FIELD = `${ALERT_RULE_NAMESPACE}.namespace` as const;
const ALERT_RULE_NOTE = `${ALERT_RULE_NAMESPACE}.note` as const;
const ALERT_RULE_REFERENCES = `${ALERT_RULE_NAMESPACE}.references` as const;
const ALERT_RULE_RULE_ID = `${ALERT_RULE_NAMESPACE}.rule_id` as const;
const ALERT_RULE_RULE_NAME_OVERRIDE = `${ALERT_RULE_NAMESPACE}.rule_name_override` as const;
const ALERT_RULE_TO = `${ALERT_RULE_NAMESPACE}.to` as const;
const ALERT_RULE_TYPE = `${ALERT_RULE_NAMESPACE}.type` as const;
const ALERT_RULE_UPDATED_AT = `${ALERT_RULE_NAMESPACE}.updated_at` as const;
const ALERT_RULE_UPDATED_BY = `${ALERT_RULE_NAMESPACE}.updated_by` as const;
const ALERT_RULE_VERSION = `${ALERT_RULE_NAMESPACE}.version` as const;

// Fields pertaining to the threat tactic associated with the rule
const ALERT_THREAT_FRAMEWORK = `${ALERT_RULE_THREAT_NAMESPACE}.framework` as const;
Expand Down Expand Up @@ -186,36 +190,8 @@ export {
ALERT_BUILDING_BLOCK_TYPE,
ALERT_EVALUATION_THRESHOLD,
ALERT_EVALUATION_VALUE,
ALERT_INSTANCE_ID,
ALERT_RISK_SCORE,
ALERT_WORKFLOW_REASON,
ALERT_WORKFLOW_USER,
ALERT_CASE_IDS,
ALERT_RULE_AUTHOR,
ALERT_RULE_CREATED_AT,
ALERT_RULE_CREATED_BY,
ALERT_RULE_DESCRIPTION,
ALERT_RULE_ENABLED,
ALERT_RULE_EXCEPTIONS_LIST,
ALERT_RULE_FROM,
ALERT_RULE_INTERVAL,
ALERT_RULE_LICENSE,
ALERT_RULE_NAMESPACE_FIELD,
ALERT_RULE_NOTE,
ALERT_RULE_REFERENCES,
ALERT_RULE_RULE_ID,
ALERT_RULE_RULE_NAME_OVERRIDE,
ALERT_RULE_TO,
ALERT_RULE_TYPE,
ALERT_RULE_UPDATED_AT,
ALERT_RULE_UPDATED_BY,
ALERT_RULE_VERSION,
ALERT_SEVERITY,
ALERT_SYSTEM_STATUS,
ECS_VERSION,
EVENT_ACTION,
EVENT_KIND,
EVENT_MODULE,
ALERT_THREAT_FRAMEWORK,
ALERT_THREAT_TACTIC_ID,
ALERT_THREAT_TACTIC_NAME,
Expand All @@ -226,14 +202,7 @@ export {
ALERT_THREAT_TECHNIQUE_SUBTECHNIQUE_ID,
ALERT_THREAT_TECHNIQUE_SUBTECHNIQUE_NAME,
ALERT_THREAT_TECHNIQUE_SUBTECHNIQUE_REFERENCE,
ALERT_SUPPRESSION_TERMS,
ALERT_SUPPRESSION_FIELD,
ALERT_SUPPRESSION_VALUE,
ALERT_SUPPRESSION_START,
ALERT_SUPPRESSION_END,
ALERT_SUPPRESSION_DOCS_COUNT,
TAGS,
TIMESTAMP,
EVENT_MODULE,
};

export type TechnicalRuleDataFieldName = ValuesType<typeof fields & typeof namespaces>;
Loading