To use the Detections feature, you first need to configure a few settings. You also need the appropriate license to send notifications when detection alerts are generated.
|
Important
|
Several steps are only required for self-managed {stack} deployments. If you are using an Elastic Cloud deployment, you only need to enable detections. |
Additionally, there are some advanced settings used to configure {kib} value list upload limits.
These steps are only required for self-managed deployments:
-
HTTPS must be configured for communication between {kibana-ref}/configuring-tls.html#configuring-tls-kib-es[{es} and {kib}].
-
In the
elasticsearch.ymlconfiguration file, set thexpack.security.enabledsetting totrue. For more information, see {ref}/settings.html[Configuring {es}] and {ref}/security-settings.html[Security settings in {es}]. -
In the
kibana.yml{kibana-ref}/settings.html[configuration file], add thexpack.encryptedSavedObjects.encryptionKeysetting with any alphanumeric value of at least 32 characters. For example:xpack.encryptedSavedObjects.encryptionKey: 'fhjskloppd678ehkdfdlliverpoolfcr'
|
Important
|
After changing the xpack.encryptedSavedObjects.encryptionKey value
and restarting {kib}, you must restart all detection rules.
|
To use the Detections feature, it must be enabled and your role must have access to rules and alerts. If your role does not have the cluster and index privileges needed to enable this feature, you can request someone who has these privileges to visit your Kibana space, which will turn it on for you. The following table describes the required privileges to access the Detections page, including rules and alerts.
|
Note
|
For instructions about using Machine Learning jobs and rules, refer to Machine learning job and rule requirements. |
| Action | Cluster Privileges | Index Privileges | Kibana Privileges | ||
|---|---|---|---|---|---|
Enable the Detections feature in your Kibana space |
The |
The
|
{kib} space NOTE: You need additional * To provide full access to rule actions and connectors, give your role * To import rules with actions and connectors, your role needs at least |
||
Manage alerts Note: Allows you to manage alerts, but not modify rules. |
N/A |
The
|
{kib} space |
||
Create the NOTE: To initiate the process that creates the |
The |
The
|
{kib} space |
Here is an example of a user who has the Detections feature enabled in all {kib} spaces:
Rules, including all background detection and the actions they generate, are authorized using an {kibana-ref}/api-keys.html[API key] associated with the last user to edit the rule. Upon creating or modifying a rule, an API key is generated for that user, capturing a snapshot of their privileges. The API key is then used to run all background tasks associated with the rule including detection checks and executing actions.
|
Important
|
If a rule requires certain privileges to run, such as index privileges, keep in mind that if a user without those privileges updates the rule, the rule will no longer function. |
You can set limits to the number of bytes and the buffer size used to upload value lists to {es-sec}.
To set the value:
-
Open
kibana.yml{kibana-ref}/settings.html[configuration file] or edit your {kib} cloud instance. -
Add any of these settings and their required values:
-
xpack.lists.maxImportPayloadBytes: Sets the number of bytes allowed for uploading {es-sec} value lists (default9000000, maximum100000000). For every 10 megabytes, it is recommended to have an additional 1 gigabyte of RAM reserved for Kibana.For example, on a Kibana instance with 2 gigabytes of RAM, you can set this value up to 20000000 (20 megabytes).
-
xpack.lists.importBufferSize: Sets the buffer size used for uploading {es-sec} value lists (default1000). Change the value if you are experiencing slow upload speeds or larger than wanted memory usage when uploading value lists. Set to a higher value to increase throughput at the expense of using more Kibana memory, or a lower value to decrease throughput and reduce memory usage.
-
|
Note
|
For information on how to configure Elastic Cloud deployments, see {cloud}/ec-manage-kibana-settings.html[Add Kibana user settings]. |
