﻿---
title: Elastic nightshift settings and limits
description: Control what Elastic nightshift can reach and how much it runs. Manage connectors and Slack, set daily run limits, add custom context, and pause detection.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9654/solutions/observability/nightshift/settings
products:
  - Elastic Cloud Serverless
  - Elastic Documentation
  - Elastic Observability
applies_to:
  - Serverless Observability projects: Preview
---

# Elastic nightshift settings and limits
On the **Settings** page, admins can control what Elastic nightshift can reach and what it can run, including connectors and Slack channels, daily run limits, custom context, and detection.

## Before you begin

Make sure you have the privileges to open Elastic nightshift **Settings**. To change daily limits, you need these privileges in all spaces. To change the settings on the **Detections** tab or turn developer mode on or off, you also need **Advanced Settings**: **All**. Refer to [Grant access](/elastic/docs-content/pull/9654/solutions/observability/nightshift/privileges#nightshift-privileges-admin).

## Open Settings

1. Select **nightshift** in the navigation menu.
2. On the home page, select `boxes_vertical` → **Settings**.

The page has the following options:
- [General](#nightshift-settings-general): Add or remove a connector, connect Slack, or turn on developer mode
- [Investigations](#nightshift-settings-investigations): Limit investigations, add custom context, or allow outbound hosts for the sandbox
- [Detections](#nightshift-settings-detections): Pause detection, change its schedule, limit its runs, or change continuous KI onboarding
- [Stop or pause Elastic nightshift](#nightshift-settings-stop): Stop Elastic nightshift from running

From the **Detections** page, select **Settings** in the header to go straight to the **Detections** tab.
When you change a run limit, a schedule setting, continuous KI onboarding, or token tracking, select **Save changes** in the bar at the bottom of the page. Other controls, such as **Save allowlist**, custom context, and **Pause detection engine**, save on their own.

## General

<definitions>
  <definition term="Connectors">
    The connectors that investigations use, such as **Local Elasticsearch**, External Elasticsearch, and GitHub. Select **Add connector**, or **Open in Stack Management** to manage all connectors in Kibana. Preconfigured connectors are read-only. Refer to [Connect your data and tools](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9654/solutions/observability/nightshift/investigation/set-up).
  </definition>
  <definition term="Slack">
    Titled **Slack channels** once a workspace is connected. Select **Connect Slack** to connect the `@Elastic` Slack app to your workspace, then connect the channels where people can ask `@Elastic` for help and where automations post results. Refer to [Set up Slack](/elastic/docs-content/pull/9654/solutions/observability/nightshift/investigation/set-up#nightshift-set-up-slack).
  </definition>
  <definition term="nightshift developer mode">
    Shows extra tabs, details, and settings for expert users. Refer to [Developer mode](#nightshift-settings-developer-mode).
  </definition>
</definitions>


### Developer mode

Developer mode shows experimental and expert parts of Elastic nightshift. It's off by default and applies to everyone in the space. To turn it on, on the **General** tab, turn on **Enable nightshift developer mode**. It adds:
- The **Signals** tab on the **Detections** page. Refer to [Rules and signals](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9654/solutions/observability/nightshift/detection/rules-and-signals).
- The **Topology** tab on the **Detections** page. Refer to [Explore the topology](/elastic/docs-content/pull/9654/solutions/observability/nightshift/detection/learning#nightshift-detection-learning-topology).
- The **Decision Trees** tab on the **Knowledge** page. Refer to [Decision trees](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9654/solutions/observability/nightshift/context/decision-trees).
- **Advanced developer settings** on the **Detections** tab, including the cost estimate. Refer to [Advanced developer settings](#nightshift-settings-advanced-dev).
- Extra details, such as the service account's role and raw metadata on Knowledge Indicators.
- A **Knowledge** section on the **General** tab, to purge what Elastic nightshift learned.

<definitions>
  <definition term="Purge knowledge learned after a point in time">
    Use it after a suspected prompt injection, or when wrong knowledge got in. It permanently deletes the investigations, Memory, Wiki pages, and decision tree versions in this space that were written after the time you set in **Delete everything learned after**. Knowledge written before that time is kept. Select **Preview impact** to check what it deletes, then **Purge knowledge**. You can't undo this, and snapshots can still hold the deleted documents.
  </definition>
</definitions>


## Investigations


### Run limits

The **Automatic** (5), **Manual** (5), and **All investigations** (10) daily limits, and the **Enforce daily limits** switch. To change them, you need **nightshift**: **All** and **Manage engines** in all spaces. Refer to [Investigation limits](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9654/solutions/observability/nightshift/investigation/limits).

### Service account

Shows whether the service account that runs every investigation is **Set up** for the space. Refer to [Privileges that Elastic nightshift runs with](/elastic/docs-content/pull/9654/solutions/observability/nightshift/privileges#nightshift-privileges-accounts).

### Custom context

Notes added to the instructions of every investigation and chat in the space, up to 200 snippets. Select **Edit investigation context** to add, edit, or delete them. For what to write, refer to [Custom context](/elastic/docs-content/pull/9654/solutions/observability/nightshift/investigation/extend#nightshift-extend-custom-context).

### Sandbox egress allowlist

The hosts that commands in the investigation sandbox can reach. A command that uses a connector can already reach that connector's host, so you need the allowlist only for other hosts, such as a package index to install a tool, or an API that has no connector.
Enter one hostname or rule per line in **Allowed hosts and rules**, up to 32 rules, then select **Save allowlist**. The allowlist applies to the current space.
<dropdown title="Allowlist rule examples">
  | Rule                              | Allows                                                                    |
  |-----------------------------------|---------------------------------------------------------------------------|
  | `api.github.com`                  | All requests to this host                                                 |
  | `*.datadoghq.com`                 | All requests to every subdomain                                           |
  | `pypi.org GET,HEAD /simple/`      | Only `GET` and `HEAD` requests to this path                               |
  | `deny api.github.com POST /gists` | Blocks `POST` requests to this path, even if another rule allows the host |
</dropdown>


## Detections


### Pause or resume detection

Pause detection while you change your sources, or to stop its cost.
1. On the **Detections** tab, in **Detection engine activity**, select **Pause detection engine**.
2. Confirm.

Pausing stops Knowledge Indicator extraction, query alerting, rule creation, and significant event discovery in this space. It turns off the rules behind KI queries and cancels running detection workflows. Workflows that every space shares stay on, but their executions in this space are canceled. Other spaces keep running, and no data is deleted.
The **Detections** page now shows **Paused**. To start again, select **Resume detection engine**, which turns the stopped rules and workflows back on. Scheduled discovery and continuous KI onboarding turn back on only if they were on before the pause.

### Scheduled detection

**Enable scheduled discovery** runs discovery automatically in the current space, so that rules and signals become significant events. It's on by default when you turn on detection. Turn it off to stop discovery without pausing the whole engine, and turn it on again to resume. Expand **Advanced schedule settings** to change the schedule.
<dropdown title="Advanced schedule settings">
  | Setting                          | What it does                                                                                                                                        | Default |
  |----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|---------|
  | **Detection interval (minutes)** | How often scheduled detection runs                                                                                                                  | 10      |
  | **Target coverage (minutes)**    | The window within which every active rule is scanned at least once. It must be longer than the detection interval, so rules are spread across runs. | 30      |
  | **Review interval (minutes)**    | How often scheduled discovery review runs                                                                                                           | 10      |
  | **Discovery batch size**         | The maximum number of detections sent to each scheduled discovery pass                                                                              | 3       |
  | **Review passes**                | The maximum number of discovery passes in each scheduled review run                                                                                 | 3       |
</dropdown>


### Detection run limits

Daily limits on scheduled detection runs. Runs that you start yourself aren't limited. To change them, you need **nightshift**: **All** and **Manage engines** in all spaces.

| Limit                                           | Counts                                        | Default |
|-------------------------------------------------|-----------------------------------------------|---------|
| **Discovery daily limit**                       | Scheduled discovery runs                      | 15      |
| **Knowledge indicators extraction daily limit** | Scheduled Knowledge Indicator extraction runs | 3       |

Each limit has its own **Enforce daily limits** switch, on by default. The limits apply to the whole deployment and reset at midnight UTC. When one is reached, scheduled runs stop until the reset, and the **Detections** page shows a message.

### Continuous KI onboarding

**Enable continuous KI onboarding** extracts Knowledge Indicators from your enabled sources at an interval, so they follow changes in your system. It turns on when the space gets its first source. **Onboarding interval (hours)** sets the minimum time between runs for one source: 12 by default, `0` for no wait. Turning it off cancels running extractions and keeps the KIs already extracted, and you can still start learning by hand. Refer to [Continuous KI onboarding](/elastic/docs-content/pull/9654/solutions/observability/nightshift/context/knowledge-indicators#sig-events-ki-continuous).

### Advanced developer settings

With developer mode on, the **Detections** tab has an **Advanced developer settings** section with the cost estimate and maintenance tools.
<dropdown title="Advanced developer settings">
  <definitions>
    <definition term="Approximate inference cost across all spaces">
      An estimate of what Elastic nightshift costs, once you turn on **Enable token tracking in this space**. Refer to [Monitor your cost](/elastic/docs-content/pull/9654/solutions/observability/nightshift/cost-and-models#nightshift-cost-monitor).
    </definition>
    <definition term="Stale event cleanup">
      Closes open significant events whose rules no longer exist, and events that stayed **Recovering** for more than 48 hours with no new evidence. This cleanup also runs automatically every day. Select **Clean up stale events** to run it now.
    </definition>
    <definition term="Reset Significant Events data">
      Permanently deletes the Knowledge Indicators, rules, and detections that Elastic nightshift generated in this space, and turns off continuous KI onboarding and scheduled discovery. Significant event history, investigations, source definitions, and your data are kept. You can't undo this.
    </definition>
    <definition term="Significant events tuning">
      Select **Edit tuning document** to change how significant event discovery is tuned. Changes can lower the quality of detection. Select **Reset to defaults** to undo them.
    </definition>
  </definitions>
</dropdown>


## Engine states

The **Detections** page shows the state of the detection engine:
- **Monitoring**: Detection runs normally.
- **Paused**: An admin paused detection. Nothing runs on a schedule, and your data and results are kept.
- **Unknown**: Elastic nightshift couldn't read the engine's state. Refresh the page.


## Stop or pause Elastic nightshift

You can't turn Elastic nightshift off or remove its setup. To stop it from running and from using tokens:
1. **Pause detection.** On the **Detections** tab, select **Pause detection engine**. Refer to [Pause or resume detection](#nightshift-settings-pause).
2. **Turn off automations.** Investigations have no pause. On the **Automations** page, turn off **Enabled** for each automation. Refer to [Automations](/elastic/docs-content/pull/9654/solutions/observability/nightshift/investigation/automations#nightshift-automations-manage).
3. **Lower the run limits.** On the **Investigations** tab, set the three investigation run limits to the lowest value, and keep **Enforce daily limits** on. A low **Manual investigations daily limit** also blocks Slack mentions and **Investigate** on alerts. Follow-up questions on open investigations are never blocked.

To start again, resume detection, turn your automations back on, and restore the limits.

## Next steps

- [Cost and models](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9654/solutions/observability/nightshift/cost-and-models): Find out what Elastic nightshift costs, and which settings keep it predictable.
- [Investigation limits](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9654/solutions/observability/nightshift/investigation/limits): Learn what happens when a limit is reached.
- [Grant access to Elastic nightshift](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9654/solutions/observability/nightshift/privileges): Give admins the privileges to change these settings.