﻿---
title: Investigate anything
description: Describe any problem in your own words, and get an investigation with the likely cause, the evidence, and actions that you can take.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/use-cases/investigate-anything
products:
  - Elastic Cloud Serverless
  - Elastic Documentation
  - Elastic Observability
applies_to:
  - Serverless Observability projects: Preview
---

# Investigate anything
Describe a problem in your own words, and in a few minutes Elastic nightshift returns the likely cause, the evidence, and actions you can take. You don't need an alert: use it for anything you notice or hear about from a customer.

## Before you begin

- An admin has [enabled Elastic nightshift](/elastic/docs-content/pull/9661/solutions/observability/nightshift/get-started#nightshift-get-started-enable), and your data is connected. Refer to [Get started](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/get-started).
- You have the privileges to start investigations. Refer to [Grant access](/elastic/docs-content/pull/9661/solutions/observability/nightshift/privileges#nightshift-privileges-analyst).

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

## Example: Slow ticket lookups

Customers report loading their tickets takes too long. No alert has fired. You open Elastic nightshift and ask:> "In the last 24 hours, why is GET /tickets on inventory-api slow? p95 looks like about 5 seconds."
A few minutes later, Elastic nightshift reports that the `tickets` table in the `encore` database has no index on `order_id`, so every lookup reads most of the table. It shows the latency chart, the queries it ran, the explanations it ruled out, and proposes adding the index.

## Write a good description

The more detailed your description, the faster Elastic nightshift finds the right data. Include:
- **The service or component**: the name of the service, database, or frontend.
- **The symptom**: slow, failing, timing out, an error message, a number that looks wrong.
- **The time window**: "in the last hour", "since 14:00 UTC", "last night between 02:00 and 03:00 UTC."
- **What you already know**: a recent deploy, a change you suspect, or what you've ruled out.

The following table provides suggestions for adding detail to your descriptions:

| Instead of           | Ask                                                                                                                 |
|----------------------|---------------------------------------------------------------------------------------------------------------------|
| "Checkout is broken" | "Why do checkout requests return 500 errors since 14:00 UTC?"                                                       |
| "Database problems?" | "Why are queries from the payment service hitting lock timeouts in the last hour?"                                  |
| "Errors went up"     | "What caused the error spike on the payment service last night around 02:00 UTC? We deployed version 2.4 at 01:45." |

<tip>
  Give a time window if the problem has already ended to prevent Elastic nightshift from looking at recent data and reporting that the problem isn't happening anymore.
</tip>


## Investigate a problem

<stepper>
  <step title="Start the investigation">
    To start an investigation from the home page:
    1. Select **nightshift** in the navigation menu to open the home page.
    2. Select **Investigate**.
    3. Describe the problem, then select **Investigate**. Refer to [Write a good description](#nightshift-uc-anything-description).
    A card appears in the **In progress** section of the home page, named after your question until Elastic nightshift gives it a title.
  </step>

  <step title="Wait for the results">
    An investigation usually takes up to five minutes, and stops after 60 minutes. You don't have to keep the page open. Meanwhile, Elastic nightshift tests hypotheses against your logs, metrics, and traces, and your code if you [connected GitHub](/elastic/docs-content/pull/9661/solutions/observability/nightshift/get-started#nightshift-get-started-other-sources).When it finishes, the card shows **Investigated** and moves to a severity section. Elastic nightshift rates the severity from the investigation results. If a person changes it, Elastic nightshift keeps that change unless later findings contradict it.
  </step>

  <step title="Read the results">
    Select the investigation card to read the results. Refer to [Read an investigation](/elastic/docs-content/pull/9661/solutions/observability/nightshift/investigation#nightshift-read-investigation).At the top, you can set the **Status**, change the **Severity**, and add **Assignees**. A conclusion is a well-tested hypothesis, not a certainty. Refer to [Check the evidence before you act](/elastic/docs-content/pull/9661/solutions/observability/nightshift/investigation#nightshift-investigations-accuracy).
  </step>

  <step title="Check the reasoning">
    Select **View hypothesis tree** to check each hypothesis that Elastic nightshift tested. Refer to [Check the reasoning in the hypothesis tree](/elastic/docs-content/pull/9661/solutions/observability/nightshift/investigation#nightshift-investigations-hypotheses).Does the confirmed hypothesis match what you observed? Did Elastic nightshift dismiss something you still suspect? Challenge it in chat. Refer to [Ask follow-up questions](#nightshift-uc-anything-chat).
  </step>

  <step title="Act on the proposed actions">
    Elastic nightshift proposes actions, such as a command, a configuration change, a code fix, or a rollback. It doesn't change your environment unless you let it run your workflows. Refer to [Remediate with workflows](/elastic/docs-content/pull/9661/solutions/observability/nightshift/investigation/extend#nightshift-extend-remediate).If an action fits, make the change, then select **Mark as applied**. Otherwise, select **Decline**. Refer to [Decide on proposed actions](/elastic/docs-content/pull/9661/solutions/observability/nightshift/investigation#nightshift-investigations-actions).
  </step>
</stepper>


## Ask follow-up questions

Chat continues the investigation with everything it found so far. Select **Open chat** at the bottom of the flyout, or the chat icon on the investigation card. The chat opens in Agent Builder next to the investigation.
For example, ask "How did you reach this conclusion?", or "Add and test a hypothesis that the slowdown started with the last deploy." For more prompts, refer to [Ask follow-up questions in chat](/elastic/docs-content/pull/9661/solutions/observability/nightshift/investigation#nightshift-investigations-chat).

## What to check

- **Read what it couldn't check**, such as a query plan or a dashboard. A gap there can change the answer.
- **Compare with what you know.** If the timeline or numbers don't match what you saw, say so in chat.
- **Close the investigation when you're done.** Set **Status** to **Closed**. A closed investigation doesn't continue; a new problem starts a new one.
- **Tell Elastic how it went.** Rate answers in chat, or open the `boxes_vertical` menu on the home page and select **Feedback**.


## Next steps

- [Investigate your alerts](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/use-cases/investigate-alerts): Start an investigation from an alert instead of a question.
- [Investigate in Slack](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/use-cases/investigate-in-slack): Ask Elastic nightshift for help from a Slack thread.
- [How investigations work](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/investigation): Learn how Elastic nightshift forms and tests hypotheses, and how far to trust a conclusion.
- [How Elastic nightshift builds context](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9661/solutions/observability/nightshift/context): Check what Elastic nightshift learned from this investigation.