

# Automatically trigger investigations with agents

Automatic investigations start an investigation with your agent when CloudWatch raises an observation, so high-impact issues are already being investigated by the time someone looks. The agent finds the likely root cause and suggests mitigation steps. The agent is the AWS DevOps Agent or a connected partner agent, such as Resolve AI.

You choose one agent per account and Region, and a minimum severity. Saving a new agent replaces the old one. Investigations are billed at the agent's investigation pricing. For the AWS DevOps Agent, see the [AWS DevOps Agent pricing page](https://aws.amazon.com/devops-agent/pricing/) on the AWS website. For a partner agent, see the partner's pricing.

## When an investigation starts
<a name="omni-observations-auto-investigations-when"></a>

An investigation starts under the following conditions:
+ It starts for each new observation at or above the minimum severity.
+ It starts one time, when the severity of an active observation first rises to the minimum or higher. This happens only if CloudWatch hasn't already tried for that observation.
+ It doesn't start for observations that were already active when you turned the feature on or lowered the severity. It starts only if their severity later rises.
+ It never retries a failed try. A failed try counts as the one try. Start that investigation manually.
+ It doesn't start if the observation looks like the same incident as an investigation that is already open. The observation shows the reason **Related investigation**.

## Before you begin
<a name="omni-observations-auto-investigations-before-you-begin"></a>

Before you begin, make sure that you have the following:
+ Observations is on. For more information, see [Turn on Observations](omni-observations-turn-on.md).
+ An agent is connected under **Settings**, **Integrations**. To learn more, see [Investigate with the AWS DevOps Agent](omni-investigate-with-the-aws-devops-agent.md) and [Investigate with AWS Partner agents](omni-investigate-with-partner-agents.md). The integration must be active, in the same account and Region, and have a role for starting investigations that trusts CloudWatch. You get this role automatically when you connect a partner agent.
+ You have the Space Admin permission level. For API permissions, see [Security in Observations](omni-observations-security.md).

## Turn on automatic investigations
<a name="omni-observations-auto-investigations-turn-on"></a>

Use the following procedure to turn on automatic investigations. After you turn them on, CloudWatch starts an investigation with your agent for each new observation at or above the severity that you choose.

**To turn on automatic investigations**

1. Open the Omni web UI.

1. Choose **Settings**, and then choose **Intelligence**.

1. In **Investigations**, turn on **Auto-trigger an investigation with your agent**.

1. For **Agent**, select your agent.

1. For **Select severity**, select the lowest severity that starts an investigation. The default is **High**.

1. Choose **Save**.

The change saves immediately.

With the API, call `PutIntelligenceConfiguration` with one `autoInvestigations` entry. For `minimumSeverity`, use `LOW`, `MEDIUM`, or `HIGH`. If you leave it out, CloudWatch uses `HIGH`.

```json
{
  "autoInvestigations": [
    {
      "integrationArn": "<agent integration ARN>",
      "minimumSeverity": "HIGH"
    }
  ]
}
```

## What happens next
<a name="omni-observations-auto-investigations-next"></a>

To open an investigation, open the observation and choose **View investigation**. In the **Observations** list, the **Investigation** column shows the investigation with the label **Auto-triggered**.

**Note**  
If no investigation starts and the save had no error, check that the integration is still active and that its role exists and trusts CloudWatch. CloudWatch checks only that the integration has a role, not that the role works.

## Turn off automatic investigations
<a name="omni-observations-auto-investigations-turn-off"></a>

In **Settings**, **Intelligence**, **Investigations**, turn off **Auto-trigger an investigation with your agent**. The change saves immediately. With the API, send an empty `autoInvestigations` list.