Preview rule alerts generated on specified time range
- Base URL
-
https://{kibana_url}
- POST /api/detection_engine/rules/preview
- POST /s/{space_id}/api/detection_engine/rules/preview
Refer to Spaces for more information.
Simulates a detection rule using the same rule type and query logic as a persisted rule, over a short
time window, without persisting a rule or writing alerts. Use the response to validate queries, see sample
matching documents, and inspect execution logs. Pair invocationCount and timeframeEnd to cap run time.
Authentication
Authorization: <value>
You must create an API key and use the encoded value in the request header. To learn about creating keys, go to API keys.
Request body
Rule create payload (same shape as POST /api/detection_engine/rules for a given type) plus
invocationCount and timeframeEnd to control how the preview is executed. Optional
enable_logged_requests surfaces Elasticsearch request logging for debugging.
type: eql
-
actionsobject[] -
Array defining the automated actions (notifications) taken when alerts are generated.
-
action_type_idstringrequired -
The action type used for sending notifications, can be:
.slack.slack_api.email.index.pagerduty.swimlane.webhook.servicenow.servicenow-itom.servicenow-sir.jira.resilient.opsgenie.teams.torq.tines.d3security
-
alerts_filterobject -
Object containing an action’s conditional filters.
timeframe(object, optional): Object containing the time frame for when this action can be run.days(array of integers, required): List of days of the week on which this action will be run. Days of the week are expressed as numbers between1-7, where1is Monday and7is Sunday. To select all days of the week, enter an empty array.hours(object, required): The hours of the day during which this action will run. Hours of the day are expressed as two strings in the formathh:mmin24hour time. A start of00:00and an end of24:00means the action can run all day.- start (string, required): Start time in
hh:mmformat. - end (string, required): End time in
hh:mmformat.
- start (string, required): Start time in
timezone(string, required): An ISO timezone name, such asEurope/MadridorAmerica/New_York. Specific offsets such asUTCorUTC+1will also work, but lack built-in DST.
query(object, optional): Object containing a query filter which gets applied to an action and determines whether the action should run.kql(string, required): A KQL string.filters(array of objects, required): Array of filter objects, as defined in thekbn-es-querypackage.
-
frequencyobject -
The action frequency defines when the action runs (for example, only on rule execution or at specific time intervals).
-
paramsobjectrequired -
Object containing the allowed connector fields, which varies according to the connector type.
For Slack:
message(string, required): The notification message.
For email:
to,cc,bcc(string): Email addresses to which the notifications are sent. At least one field must have a value.subject(string, optional): Email subject line.message(string, required): Email body text.
For Webhook:
body(string, required): JSON payload.
For PagerDuty:
severity(string, required): Severity of on the alert notification, can be:Critical,Error,WarningorInfo.eventAction(string, required): Event action type, which can betrigger,resolve, oracknowledge.dedupKey(string, optional): Groups alert notifications with the same PagerDuty alert.timestamp(DateTime, optional): ISO-8601 format timestamp.component(string, optional): Source machine component responsible for the event, for examplesecurity-solution.group(string, optional): Enables logical grouping of service components.source(string, optional): The affected system. Defaults to the Kibana saved object ID of the action.summary(string, options): Summary of the event. Defaults toNo summary provided. Maximum length is 1024 characters.class(string, optional): Value indicating the class/type of the event.
-
building_block_typestring -
Determines if the rule acts as a building block. If yes, the value must be
default. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to About building block rules. -
false_positivesstring[] -
String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
-
fromstring · format: date-math -
Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
-
intervalstring -
Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
-
investigation_fieldsobject -
Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
-
max_signalsinteger · min: 1 -
Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run advanced setting value). Defaults to
100.NoteThis setting can be superseded by the Kibana configuration setting
xpack.alerting.rules.run.alerts.max, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, ifxpack.alerting.rules.run.alerts.maxis set to 1000, the rule can generate no more than 1000 alerts even ifmax_signalsis set higher. -
metaobject -
Placeholder for metadata about the rule.
NoteThis field is overwritten when you save changes to the rule’s settings.
-
referencesstring[] -
Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
-
required_fieldsobject[] -
Elasticsearch fields and their types that need to be present for the rule to function.
NoteThe value of
required_fieldsdoes not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Userequired_fieldsas an informational property to document the fields that the rule expects to be present in the data. -
response_actionsunion oneOf[] - One of:
-
paramsobjectrequired -
ecs_mappingmap string to object -
Map Osquery results columns or static values to Elastic Common Schema (ECS) fields. Example: "ecs_mapping": {"process.pid": {"field": "pid"}}
-
pack_idstring · max length: 256 -
To specify a query pack, use the packId field. Example: "packId": "processes_elastic"
-
querystring · max length: 30000 -
To run a single query, use the query field and enter a SQL query. Example: "query": "SELECT * FROM processes;"
-
risk_scoreinteger · min: 0 · max: 100required -
A numerical representation of the alert's severity from 0 to 100, where:
0-21represents low severity22-47represents medium severity48-73represents high severity74-100represents critical severity
-
risk_score_mappingobject[] -
Overrides generated alerts' risk_score with a value from the source event
-
rule_idstring -
A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same
rule_ids. -
rule_name_overridestring -
Sets which field in the source event is used to populate the alert's
signal.rule.namevalue (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’snamevalue is used. The source field must be a string data type. -
setupstring -
Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
severity_mappingobject[] -
Overrides generated alerts' severity with values from the source event
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
tagsstring[] -
String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
-
timestamp_overridestring -
Sets the time field used to query indices. When unspecified, rules query the
@timestampfield. The source field must be an Elasticsearch date data type. -
versioninteger · min: 1 -
The rule's version number.
- For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
security_detection_engineFleet package that is used for distributing prebuilt rules). - For custom rules it is set to
1when the rule is created.
NoteIt is not incremented on each update. Compare this to the
revisionfield. - For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
-
querystringrequired -
Query used by the rule to create alerts.
- For indicator match rules, only the query’s results are used to determine whether an alert is generated.
- ES|QL rules have additional query requirements. Refer to Create ES|QL rules for more information.
-
filtersobject[] -
The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array.
NoteThis field is not supported for ES|QL rules.
-
indexstring[] -
Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings →
securitySolution:defaultIndex).NoteThis field is not supported for ES|QL rules.
type: query
-
actionsobject[] -
Array defining the automated actions (notifications) taken when alerts are generated.
-
Same fields as
actionsintype: eql -
building_block_typestring -
Determines if the rule acts as a building block. If yes, the value must be
default. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to About building block rules. -
false_positivesstring[] -
String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
-
fromstring · format: date-math -
Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
-
intervalstring -
Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
-
investigation_fieldsobject -
Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
-
max_signalsinteger · min: 1 -
Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run advanced setting value). Defaults to
100.NoteThis setting can be superseded by the Kibana configuration setting
xpack.alerting.rules.run.alerts.max, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, ifxpack.alerting.rules.run.alerts.maxis set to 1000, the rule can generate no more than 1000 alerts even ifmax_signalsis set higher. -
metaobject -
Placeholder for metadata about the rule.
NoteThis field is overwritten when you save changes to the rule’s settings.
-
referencesstring[] -
Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
-
required_fieldsobject[] -
Elasticsearch fields and their types that need to be present for the rule to function.
NoteThe value of
required_fieldsdoes not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Userequired_fieldsas an informational property to document the fields that the rule expects to be present in the data. -
response_actionsunion oneOf[] -
Same options as
response_actionsintype: eql -
risk_scoreinteger · min: 0 · max: 100required -
A numerical representation of the alert's severity from 0 to 100, where:
0-21represents low severity22-47represents medium severity48-73represents high severity74-100represents critical severity
-
risk_score_mappingobject[] -
Overrides generated alerts' risk_score with a value from the source event
-
rule_idstring -
A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same
rule_ids. -
rule_name_overridestring -
Sets which field in the source event is used to populate the alert's
signal.rule.namevalue (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’snamevalue is used. The source field must be a string data type. -
setupstring -
Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
severity_mappingobject[] -
Overrides generated alerts' severity with values from the source event
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
tagsstring[] -
String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
-
threatobject[] -
Same fields as
threatintype: eql -
timestamp_overridestring -
Sets the time field used to query indices. When unspecified, rules query the
@timestampfield. The source field must be an Elasticsearch date data type. -
versioninteger · min: 1 -
The rule's version number.
- For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
security_detection_engineFleet package that is used for distributing prebuilt rules). - For custom rules it is set to
1when the rule is created.
NoteIt is not incremented on each update. Compare this to the
revisionfield. - For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
-
filtersobject[] -
The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array.
NoteThis field is not supported for ES|QL rules.
-
indexstring[] -
Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings →
securitySolution:defaultIndex).NoteThis field is not supported for ES|QL rules.
-
saved_idstring -
Kibana saved search used by the rule to create alerts.
-
querystring -
Query used by the rule to create alerts.
- For indicator match rules, only the query’s results are used to determine whether an alert is generated.
- ES|QL rules have additional query requirements. Refer to Create ES|QL rules for more information.
type: saved_query
-
actionsobject[] -
Array defining the automated actions (notifications) taken when alerts are generated.
-
Same fields as
actionsintype: eql -
building_block_typestring -
Determines if the rule acts as a building block. If yes, the value must be
default. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to About building block rules. -
false_positivesstring[] -
String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
-
fromstring · format: date-math -
Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
-
intervalstring -
Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
-
investigation_fieldsobject -
Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
-
max_signalsinteger · min: 1 -
Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run advanced setting value). Defaults to
100.NoteThis setting can be superseded by the Kibana configuration setting
xpack.alerting.rules.run.alerts.max, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, ifxpack.alerting.rules.run.alerts.maxis set to 1000, the rule can generate no more than 1000 alerts even ifmax_signalsis set higher. -
metaobject -
Placeholder for metadata about the rule.
NoteThis field is overwritten when you save changes to the rule’s settings.
-
referencesstring[] -
Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
-
required_fieldsobject[] -
Elasticsearch fields and their types that need to be present for the rule to function.
NoteThe value of
required_fieldsdoes not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Userequired_fieldsas an informational property to document the fields that the rule expects to be present in the data. -
response_actionsunion oneOf[] -
Same options as
response_actionsintype: eql -
risk_scoreinteger · min: 0 · max: 100required -
A numerical representation of the alert's severity from 0 to 100, where:
0-21represents low severity22-47represents medium severity48-73represents high severity74-100represents critical severity
-
risk_score_mappingobject[] -
Overrides generated alerts' risk_score with a value from the source event
-
rule_idstring -
A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same
rule_ids. -
rule_name_overridestring -
Sets which field in the source event is used to populate the alert's
signal.rule.namevalue (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’snamevalue is used. The source field must be a string data type. -
setupstring -
Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
severity_mappingobject[] -
Overrides generated alerts' severity with values from the source event
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
tagsstring[] -
String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
-
threatobject[] -
Same fields as
threatintype: eql -
timestamp_overridestring -
Sets the time field used to query indices. When unspecified, rules query the
@timestampfield. The source field must be an Elasticsearch date data type. -
versioninteger · min: 1 -
The rule's version number.
- For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
security_detection_engineFleet package that is used for distributing prebuilt rules). - For custom rules it is set to
1when the rule is created.
NoteIt is not incremented on each update. Compare this to the
revisionfield. - For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
-
saved_idstringrequired -
Kibana saved search used by the rule to create alerts.
-
filtersobject[] -
The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array.
NoteThis field is not supported for ES|QL rules.
-
indexstring[] -
Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings →
securitySolution:defaultIndex).NoteThis field is not supported for ES|QL rules.
-
querystring -
Query used by the rule to create alerts.
- For indicator match rules, only the query’s results are used to determine whether an alert is generated.
- ES|QL rules have additional query requirements. Refer to Create ES|QL rules for more information.
type: threshold
-
actionsobject[] -
Array defining the automated actions (notifications) taken when alerts are generated.
-
Same fields as
actionsintype: eql -
building_block_typestring -
Determines if the rule acts as a building block. If yes, the value must be
default. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to About building block rules. -
false_positivesstring[] -
String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
-
fromstring · format: date-math -
Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
-
intervalstring -
Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
-
investigation_fieldsobject -
Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
-
max_signalsinteger · min: 1 -
Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run advanced setting value). Defaults to
100.NoteThis setting can be superseded by the Kibana configuration setting
xpack.alerting.rules.run.alerts.max, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, ifxpack.alerting.rules.run.alerts.maxis set to 1000, the rule can generate no more than 1000 alerts even ifmax_signalsis set higher. -
metaobject -
Placeholder for metadata about the rule.
NoteThis field is overwritten when you save changes to the rule’s settings.
-
referencesstring[] -
Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
-
required_fieldsobject[] -
Elasticsearch fields and their types that need to be present for the rule to function.
NoteThe value of
required_fieldsdoes not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Userequired_fieldsas an informational property to document the fields that the rule expects to be present in the data. -
response_actionsunion oneOf[] -
Same options as
response_actionsintype: eql -
risk_scoreinteger · min: 0 · max: 100required -
A numerical representation of the alert's severity from 0 to 100, where:
0-21represents low severity22-47represents medium severity48-73represents high severity74-100represents critical severity
-
risk_score_mappingobject[] -
Overrides generated alerts' risk_score with a value from the source event
-
rule_idstring -
A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same
rule_ids. -
rule_name_overridestring -
Sets which field in the source event is used to populate the alert's
signal.rule.namevalue (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’snamevalue is used. The source field must be a string data type. -
setupstring -
Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
severity_mappingobject[] -
Overrides generated alerts' severity with values from the source event
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
tagsstring[] -
String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
-
threatobject[] -
Same fields as
threatintype: eql -
timestamp_overridestring -
Sets the time field used to query indices. When unspecified, rules query the
@timestampfield. The source field must be an Elasticsearch date data type. -
versioninteger · min: 1 -
The rule's version number.
- For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
security_detection_engineFleet package that is used for distributing prebuilt rules). - For custom rules it is set to
1when the rule is created.
NoteIt is not incremented on each update. Compare this to the
revisionfield. - For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
-
querystringrequired -
Query used by the rule to create alerts.
- For indicator match rules, only the query’s results are used to determine whether an alert is generated.
- ES|QL rules have additional query requirements. Refer to Create ES|QL rules for more information.
-
thresholdobjectrequired -
filtersobject[] -
The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array.
NoteThis field is not supported for ES|QL rules.
-
indexstring[] -
Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings →
securitySolution:defaultIndex).NoteThis field is not supported for ES|QL rules.
-
saved_idstring -
Kibana saved search used by the rule to create alerts.
type: threat_match
-
actionsobject[] -
Array defining the automated actions (notifications) taken when alerts are generated.
-
Same fields as
actionsintype: eql -
building_block_typestring -
Determines if the rule acts as a building block. If yes, the value must be
default. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to About building block rules. -
false_positivesstring[] -
String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
-
fromstring · format: date-math -
Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
-
intervalstring -
Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
-
investigation_fieldsobject -
Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
-
max_signalsinteger · min: 1 -
Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run advanced setting value). Defaults to
100.NoteThis setting can be superseded by the Kibana configuration setting
xpack.alerting.rules.run.alerts.max, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, ifxpack.alerting.rules.run.alerts.maxis set to 1000, the rule can generate no more than 1000 alerts even ifmax_signalsis set higher. -
metaobject -
Placeholder for metadata about the rule.
NoteThis field is overwritten when you save changes to the rule’s settings.
-
referencesstring[] -
Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
-
required_fieldsobject[] -
Elasticsearch fields and their types that need to be present for the rule to function.
NoteThe value of
required_fieldsdoes not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Userequired_fieldsas an informational property to document the fields that the rule expects to be present in the data. -
response_actionsunion oneOf[] -
Same options as
response_actionsintype: eql -
risk_scoreinteger · min: 0 · max: 100required -
A numerical representation of the alert's severity from 0 to 100, where:
0-21represents low severity22-47represents medium severity48-73represents high severity74-100represents critical severity
-
risk_score_mappingobject[] -
Overrides generated alerts' risk_score with a value from the source event
-
rule_idstring -
A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same
rule_ids. -
rule_name_overridestring -
Sets which field in the source event is used to populate the alert's
signal.rule.namevalue (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’snamevalue is used. The source field must be a string data type. -
setupstring -
Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
severity_mappingobject[] -
Overrides generated alerts' severity with values from the source event
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
tagsstring[] -
String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
-
threatobject[] -
Same fields as
threatintype: eql -
timestamp_overridestring -
Sets the time field used to query indices. When unspecified, rules query the
@timestampfield. The source field must be an Elasticsearch date data type. -
versioninteger · min: 1 -
The rule's version number.
- For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
security_detection_engineFleet package that is used for distributing prebuilt rules). - For custom rules it is set to
1when the rule is created.
NoteIt is not incremented on each update. Compare this to the
revisionfield. - For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
-
querystringrequired -
Query used by the rule to create alerts.
- For indicator match rules, only the query’s results are used to determine whether an alert is generated.
- ES|QL rules have additional query requirements. Refer to Create ES|QL rules for more information.
-
threat_indexstring[]required -
Elasticsearch indices used to check which field values generate alerts.
-
threat_mappingobject[] · min items: 1required -
Array of entries objects that define mappings between the source event fields and the values in the Elasticsearch threat index. Each entries object must contain these fields:
- field: field from the event indices on which the rule runs
- type: must be mapping
- value: field from the Elasticsearch threat index
You can use Boolean and and or logic to define the conditions for when matching fields and values generate alerts. Sibling entries objects are evaluated using or logic, whereas multiple entries in a single entries object use and logic. See Example of Threat Match rule which uses both
andandorlogic. -
threat_querystringrequired -
Query used to determine which fields in the Elasticsearch index are used for generating alerts.
-
filtersobject[] -
The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array.
NoteThis field is not supported for ES|QL rules.
-
indexstring[] -
Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings →
securitySolution:defaultIndex).NoteThis field is not supported for ES|QL rules.
-
saved_idstring -
Kibana saved search used by the rule to create alerts.
type: machine_learning
-
actionsobject[] -
Array defining the automated actions (notifications) taken when alerts are generated.
-
Same fields as
actionsintype: eql -
building_block_typestring -
Determines if the rule acts as a building block. If yes, the value must be
default. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to About building block rules. -
false_positivesstring[] -
String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
-
fromstring · format: date-math -
Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
-
intervalstring -
Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
-
investigation_fieldsobject -
Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
-
max_signalsinteger · min: 1 -
Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run advanced setting value). Defaults to
100.NoteThis setting can be superseded by the Kibana configuration setting
xpack.alerting.rules.run.alerts.max, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, ifxpack.alerting.rules.run.alerts.maxis set to 1000, the rule can generate no more than 1000 alerts even ifmax_signalsis set higher. -
metaobject -
Placeholder for metadata about the rule.
NoteThis field is overwritten when you save changes to the rule’s settings.
-
referencesstring[] -
Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
-
required_fieldsobject[] -
Elasticsearch fields and their types that need to be present for the rule to function.
NoteThe value of
required_fieldsdoes not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Userequired_fieldsas an informational property to document the fields that the rule expects to be present in the data. -
response_actionsunion oneOf[] -
Same options as
response_actionsintype: eql -
risk_scoreinteger · min: 0 · max: 100required -
A numerical representation of the alert's severity from 0 to 100, where:
0-21represents low severity22-47represents medium severity48-73represents high severity74-100represents critical severity
-
risk_score_mappingobject[] -
Overrides generated alerts' risk_score with a value from the source event
-
rule_idstring -
A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same
rule_ids. -
rule_name_overridestring -
Sets which field in the source event is used to populate the alert's
signal.rule.namevalue (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’snamevalue is used. The source field must be a string data type. -
setupstring -
Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
severity_mappingobject[] -
Overrides generated alerts' severity with values from the source event
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
tagsstring[] -
String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
-
threatobject[] -
Same fields as
threatintype: eql -
timestamp_overridestring -
Sets the time field used to query indices. When unspecified, rules query the
@timestampfield. The source field must be an Elasticsearch date data type. -
versioninteger · min: 1 -
The rule's version number.
- For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
security_detection_engineFleet package that is used for distributing prebuilt rules). - For custom rules it is set to
1when the rule is created.
NoteIt is not incremented on each update. Compare this to the
revisionfield. - For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
-
anomaly_thresholdinteger · min: 0required -
Anomaly score threshold above which the rule creates an alert. Valid values are from 0 to 100.
-
machine_learning_job_idunion oneOfrequired -
Machine learning job ID(s) the rule monitors for anomaly scores.
-
One of:
string[]orstring
type: new_terms
-
actionsobject[] -
Array defining the automated actions (notifications) taken when alerts are generated.
-
Same fields as
actionsintype: eql -
building_block_typestring -
Determines if the rule acts as a building block. If yes, the value must be
default. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to About building block rules. -
false_positivesstring[] -
String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
-
fromstring · format: date-math -
Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
-
intervalstring -
Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
-
investigation_fieldsobject -
Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
-
max_signalsinteger · min: 1 -
Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run advanced setting value). Defaults to
100.NoteThis setting can be superseded by the Kibana configuration setting
xpack.alerting.rules.run.alerts.max, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, ifxpack.alerting.rules.run.alerts.maxis set to 1000, the rule can generate no more than 1000 alerts even ifmax_signalsis set higher. -
metaobject -
Placeholder for metadata about the rule.
NoteThis field is overwritten when you save changes to the rule’s settings.
-
referencesstring[] -
Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
-
required_fieldsobject[] -
Elasticsearch fields and their types that need to be present for the rule to function.
NoteThe value of
required_fieldsdoes not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Userequired_fieldsas an informational property to document the fields that the rule expects to be present in the data. -
response_actionsunion oneOf[] -
Same options as
response_actionsintype: eql -
risk_scoreinteger · min: 0 · max: 100required -
A numerical representation of the alert's severity from 0 to 100, where:
0-21represents low severity22-47represents medium severity48-73represents high severity74-100represents critical severity
-
risk_score_mappingobject[] -
Overrides generated alerts' risk_score with a value from the source event
-
rule_idstring -
A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same
rule_ids. -
rule_name_overridestring -
Sets which field in the source event is used to populate the alert's
signal.rule.namevalue (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’snamevalue is used. The source field must be a string data type. -
setupstring -
Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
severity_mappingobject[] -
Overrides generated alerts' severity with values from the source event
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
tagsstring[] -
String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
-
threatobject[] -
Same fields as
threatintype: eql -
timestamp_overridestring -
Sets the time field used to query indices. When unspecified, rules query the
@timestampfield. The source field must be an Elasticsearch date data type. -
versioninteger · min: 1 -
The rule's version number.
- For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
security_detection_engineFleet package that is used for distributing prebuilt rules). - For custom rules it is set to
1when the rule is created.
NoteIt is not incremented on each update. Compare this to the
revisionfield. - For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
-
history_window_startstring · format: nonempty · min length: 1required -
Start date to use when checking if a term has been seen before. Supports relative dates – for example, now-30d will search the last 30 days of data when checking if a term is new. We do not recommend using absolute dates, which can cause issues with rule performance due to querying increasing amounts of data over time.
-
querystringrequired -
Query used by the rule to create alerts.
- For indicator match rules, only the query’s results are used to determine whether an alert is generated.
- ES|QL rules have additional query requirements. Refer to Create ES|QL rules for more information.
-
filtersobject[] -
The query and filter context array used to define the conditions for when alerts are created from events. Defaults to an empty array.
NoteThis field is not supported for ES|QL rules.
type: esql
-
actionsobject[] -
Array defining the automated actions (notifications) taken when alerts are generated.
-
Same fields as
actionsintype: eql -
building_block_typestring -
Determines if the rule acts as a building block. If yes, the value must be
default. By default, building-block alerts are not displayed in the UI. These rules are used as a foundation for other rules that do generate alerts. For more information, refer to About building block rules. -
false_positivesstring[] -
String array used to describe common reasons why the rule may issue false-positive alerts. Defaults to an empty array.
-
fromstring · format: date-math -
Time from which data is analyzed each time the rule runs, using a date math range. For example, now-4200s means the rule analyzes data from 70 minutes before its start time. Defaults to now-6m (analyzes data from 6 minutes before the start time).
-
intervalstring -
Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes).
-
investigation_fieldsobject -
Schema for fields relating to investigation fields. These are user defined fields we use to highlight in various features in the UI such as alert details flyout and exceptions auto-population from alert.
-
max_signalsinteger · min: 1 -
Maximum number of alerts the rule can create during a single run (the rule’s Max alerts per run advanced setting value). Defaults to
100.NoteThis setting can be superseded by the Kibana configuration setting
xpack.alerting.rules.run.alerts.max, which determines the maximum alerts generated by any rule in the Kibana alerting framework. For example, ifxpack.alerting.rules.run.alerts.maxis set to 1000, the rule can generate no more than 1000 alerts even ifmax_signalsis set higher. -
metaobject -
Placeholder for metadata about the rule.
NoteThis field is overwritten when you save changes to the rule’s settings.
-
referencesstring[] -
Array containing notes about or references to relevant information about the rule. Defaults to an empty array.
-
required_fieldsobject[] -
Elasticsearch fields and their types that need to be present for the rule to function.
NoteThe value of
required_fieldsdoes not affect the rule’s behavior, and specifying it incorrectly won’t cause the rule to fail. Userequired_fieldsas an informational property to document the fields that the rule expects to be present in the data. -
response_actionsunion oneOf[] -
Same options as
response_actionsintype: eql -
risk_scoreinteger · min: 0 · max: 100required -
A numerical representation of the alert's severity from 0 to 100, where:
0-21represents low severity22-47represents medium severity48-73represents high severity74-100represents critical severity
-
risk_score_mappingobject[] -
Overrides generated alerts' risk_score with a value from the source event
-
rule_idstring -
A stable unique identifier for the rule object. It can be assigned during rule creation. It can be any string, but often is a UUID. It should be unique not only within a given Kibana space, but also across spaces and Elastic environments. The same prebuilt Elastic rule, when installed in two different Kibana spaces or two different Elastic environments, will have the same
rule_ids. -
rule_name_overridestring -
Sets which field in the source event is used to populate the alert's
signal.rule.namevalue (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’snamevalue is used. The source field must be a string data type. -
setupstring -
Populates the rule’s setup guide with instructions on rule prerequisites such as required integrations, configuration steps, and anything else needed for the rule to work correctly.
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
severity_mappingobject[] -
Overrides generated alerts' severity with values from the source event
-
severityenumrequired -
Severity level of alerts produced by the rule, which must be one of the following:
low: Alerts that are of interest but generally not considered to be security incidentsmedium: Alerts that require investigationhigh: Alerts that require immediate investigationcritical: Alerts that indicate it is highly likely a security incident has occurred
-
Values:
lowmediumhighcritical -
tagsstring[] -
String array containing words and phrases to help categorize, filter, and search rules. Defaults to an empty array.
-
threatobject[] -
Same fields as
threatintype: eql -
timestamp_overridestring -
Sets the time field used to query indices. When unspecified, rules query the
@timestampfield. The source field must be an Elasticsearch date data type. -
versioninteger · min: 1 -
The rule's version number.
- For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
security_detection_engineFleet package that is used for distributing prebuilt rules). - For custom rules it is set to
1when the rule is created.
NoteIt is not incremented on each update. Compare this to the
revisionfield. - For prebuilt rules it represents the version of the rule's content in the source detection-rules repository (and the corresponding
-
querystringrequired -
Query used by the rule to create alerts.
- For indicator match rules, only the query’s results are used to determine whether an alert is generated.
- ES|QL rules have additional query requirements. Refer to Create ES|QL rules for more information.