﻿---
title: Detect problems your alerts miss
description: Turn on Elastic nightshift detection to find problems in your logs that none of your alerts catch, review the significant events it raises, and investigate them.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/use-cases/detect-problems
products:
  - Elastic Cloud Serverless
  - Elastic Documentation
  - Elastic Observability
applies_to:
  - Serverless Observability projects: Preview
---

# Detect problems your alerts miss
Elastic nightshift uses detection to find problems that you haven't created designated alerts for. Elastic nightshift learns how your system normally behaves from your logs, watches for unusual changes, and groups those changes into a [significant event](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/detection/significant-events). You can then review the evidence from one significant event instead of many small alerts. Then, you can start an investigation.

## Before you begin

- An admin has [enabled Elastic nightshift](/elastic/docs-content/pull/9661/solutions/observability/nightshift/get-started#nightshift-get-started-enable).
- You have the privileges to turn on detection, or an admin has turned it on. Refer to [Grant access](/elastic/docs-content/pull/9661/solutions/observability/nightshift/privileges#nightshift-privileges-admin).
- You have recent logs in your project. Detection is optimized for logs.

Detection runs all the time and uses tokens. Refer to [Cost and models](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/cost-and-models).

## Example: Statement timeouts nobody alerted on

Your alerts cover latency and error rates on `inventory-api`, but nothing watches the Postgres logs. One evening, Postgres starts to cancel `inventory-api` statements on the `encore` database because they reach the statement timeout. Users retry, so the error rate stays below your alert threshold.
Detection notices the timeout messages in the Postgres logs and raises a significant event: **Inventory API — PostgreSQL statement timeouts**, severity **High**, status **Active**. You open it, read what it found, and select **Investigate** to find out why.

## How detection finds problems

Detection learns your system from your logs, writes its own rules, and groups unusual changes into one significant event. Refer to [From your data to a significant event](/elastic/docs-content/pull/9661/solutions/observability/nightshift/detection#nightshift-detection-flow).

## Find and investigate problems

<stepper>
  <step title="Turn on detection">
    If the **Detection engine** on the **Detections** page doesn't show **Monitoring** yet, follow the detection steps in [Get started](/elastic/docs-content/pull/9661/solutions/observability/nightshift/get-started#nightshift-get-started-detection). The first KIs and rules appear within a few minutes, and the first signals 40 minutes to about 2.5 hours later while the rules warm up. After that, a new problem takes about 10 to 30 minutes to detect.
  </step>

  <step title="Review significant events">
    On the Elastic nightshift home page, select **Detections**. The **Events** tab lists the active and recovering significant events of the **Last 24 hours**. Inactive events are filtered out by default.To filter events and read the statuses, refer to [Review significant events](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/detection/significant-events).
  </step>

  <step title="Read an event">
    Select the event to read **What happened?** and the detections behind it. Treat a low confidence as a lead to check. Refer to [Review an event](/elastic/docs-content/pull/9661/solutions/observability/nightshift/detection/significant-events#nightshift-detection-events-read).
  </step>

  <step title="Investigate the event">
    The event tells you *what* changed. An investigation finds out *why*.
    1. In the **Events** list, find an event whose **Investigation** column shows **Not started**.
    2. In the **Actions** column, select **Investigate**. Or, in the event's details, select **Actions** → **Run investigation**.
    The investigation runs like any other, and counts toward the **Manual investigations daily limit**. Refer to [Read an investigation](/elastic/docs-content/pull/9661/solutions/observability/nightshift/investigation#nightshift-read-investigation). When it's done, the **Investigation** column shows **Completed**. For the other actions on an event, refer to [Act on an event](/elastic/docs-content/pull/9661/solutions/observability/nightshift/detection/significant-events#nightshift-detection-events-act).
  </step>
</stepper>


## Investigate significant events automatically

Elastic nightshift doesn't automatically investigate significant events. To have them investigated when they're raised, create an automation:
1. Follow [Create the automation](/elastic/docs-content/pull/9661/solutions/observability/nightshift/use-cases/auto-investigate-alerts#nightshift-uc-auto-create).
2. In the trigger, select **any source**, then **Only these sources** and **Significant events**.
3. Optionally, select a severity, such as **High** and **Critical**, so only the most serious events are investigated.
4. Under **Notifications**, add **Post in Slack**, so the findings go to your team's channel.

These investigations count toward the **Automatic investigations daily limit**. Refer to [Investigation limits](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/investigation/limits).

## Best practices

- **Give it time.** Detection starts with few rules, and some rules show zero matches at first. It improves as it learns more about your system.
- **Mark noise inactive.** If an event isn't a problem, select **Mark inactive**, so your team doesn't look at it again. Inactive events are filtered out of the default list, and you can still inspect them with the **Status** filter.
- **Check what it learned.** Detection is only as good as what Elastic nightshift has learned about your system. Refer to [How detection learns your system](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/detection/learning).
- **Pause it if you need to.** An admin can pause detection in Settings. Refer to [Pause or resume detection](/elastic/docs-content/pull/9661/solutions/observability/nightshift/settings#nightshift-settings-pause).


## Next steps

- [How detection works](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/detection): Learn how data becomes Knowledge Indicators, rules, signals, and significant events.
- [Review significant events](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/detection/significant-events): Learn every filter, status, and action on the **Events** tab.
- [Manage what detection monitors](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/detection/sources): Add, edit, or pause sources.
- [Automatically investigate your alerts](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/use-cases/auto-investigate-alerts): Set up the automation that investigates significant events for you.