You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/sre-agent/usage.md
+63-13Lines changed: 63 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create and use an Azure SRE Agent (preview)
3
3
description: Learn to use an automated agent to resolve problems and keep your apps running in Azure.
4
4
author: craigshoemaker
5
5
ms.topic: how-to
6
-
ms.date: 06/17/2025
6
+
ms.date: 06/13/2025
7
7
ms.author: cshoe
8
8
ms.service: azure
9
9
---
@@ -14,17 +14,29 @@ An Azure SRE Agent helps you maintain the health and performance of your Azure r
14
14
15
15
This article demonstrates how to create an SRE Agent, connect it to your resources to maintain optimal application performance.
16
16
17
+
## Run modes
18
+
19
+
Azure SRE Agent operates in one of three different modes. Your agent behaves differently, depending on the mode type you select.
20
+
21
+
The three different types of modes are:
22
+
23
+
***Read-only**: The read-only mode puts your agent in an observation mode. The agent has access to your inspect and report on your apps and can advise you on what actions to take. In this mode, the agent only has *reader* access to most services. In limited instances, the agent is granted *contributor* access to services solely to access configuration data.
24
+
25
+
***Review**: As the agent operates in review mode, the agent can make changes to your apps and services on your behalf, but doesn't take action unless you give express approval. In this mode, the agent has *reader* or *contributor* access to services.
26
+
27
+
***Autonomous**: Autonomous mode gives the agent full ability to work on your behalf without the need to request approval to proceed. In this mode, the agent has *reader* or *contributor* access to services.
28
+
17
29
## Create an agent
18
30
19
-
Create an agent by pointing it to the resource groups you want to monitor.
31
+
Create an agent by associating resource groups you want to monitor to the agent.
20
32
21
33
### Prerequisites
22
34
23
35
You need to grant your agent the correct permissions and access to the right namespace.
24
36
25
-
-**Security context**: Before you can create a new agent, make sure your user account has the `Microsoft.Authorization/roleAssignments/write` permissions using either [Role Based Access Control Administrator](/azure/role-based-access-control/built-in-roles) or [User Access Administrator](/azure/role-based-access-control/built-in-roles).
37
+
***Security context**: Before you can create a new agent, make sure your user account has the `Microsoft.Authorization/roleAssignments/write` permissions using either [Role Based Access Control Administrator](/azure/role-based-access-control/built-in-roles) or [User Access Administrator](/azure/role-based-access-control/built-in-roles).
26
38
27
-
-**Namespace**: Using the cloud shell in the Azure portal, run the following command:
39
+
***Namespace**: Using the cloud shell in the Azure portal, run the following command:
28
40
29
41
```azurecli
30
42
az provider register --namespace "Microsoft.App"
@@ -34,30 +46,43 @@ You need to grant your agent the correct permissions and access to the right nam
34
46
35
47
To create an SRE Agent, follow these steps:
36
48
37
-
1. Go to the Azure portal and search for and select **SRE Agent**.
49
+
1. Go to the Azure portal and search for and select **Azure SRE Agent**.
38
50
39
51
1. Select **Create**.
40
52
41
53
1. Enter the following values in the *Create agent* window:
42
54
55
+
During this step, you create a new resource group specifically for your agent which is independent of the resource group used for your application.
56
+
57
+
In the *Project details* section, enter the following values:
58
+
43
59
| Property | Value |
44
60
|---|---|
45
61
| Subscription | Select your Azure subscription. |
46
-
| Resource group | Select an existing resource group or to create a new one, enter a name. |
47
-
| Name | Enter a name for your agent. |
48
-
| Region | Select **Sweden Central**.<br><br>During preview, SRE Agents are only available in the *Sweden Central* region, but they can monitor resources in any Azure region.|
49
-
| Choose role | Select **Contributor role**. |
62
+
| Resource group | Select an existing resource group or to create a new one, enter a name. |
63
+
64
+
In the *Agent details* section, enter the following values:
65
+
66
+
| Property | Value |
67
+
|---|---|
68
+
| Agent name | Enter a name for your agent. |
69
+
| Region | Select **Sweden Central**.<br><br>During preview, Azure SRE Agent is only available in the *Sweden Central* region, but the agent can monitor resources in any Azure region. |
70
+
| Run mode| Select **Review*.<br><br>When in *review mode*, the agent works on your behalf only with your approval. |
71
+
72
+
1. Select **Choose resource groups**.
50
73
51
-
1. Select the **Select resource groups** button.
74
+
1. In the *Choose resource groups to monitor* window, search for the resource group you want to monitor.
52
75
53
-
1. In the *Select resource groups to monitor* window, search for the resource group you want to monitor.
76
+
**Avoid selecting the resource group link.**
54
77
55
-
Avoid selecting the resource group name link. To select a resource group, check the checkbox next to the resource group.
78
+
To select a resource group, select the checkbox next to the resource group.
56
79
57
80
1. Scroll to the bottom of the dialog window and select **Save**.
58
81
59
82
1. Select **Create**.
60
83
84
+
Once you begin the create process, a page with the message *Deployment is in progress* is displayed.
85
+
61
86
## Chat with your agent
62
87
63
88
Your agent has access to any resource inside the resource group associated with the agent. Use the chat feature to help you inquire about and resolve issues related to your resources.
@@ -80,6 +105,31 @@ If you have a specific problem in mind, you could ask questions like:
80
105
- Can you investigate `<RESOURCE_NAME>`?
81
106
- Can you get me the `<METRIC>` of `<RESOURCE_NAME>`?
82
107
108
+
## Update managed resource groups
109
+
110
+
You can change the list of resource groups managed by your agent at any time. To change the list is of managed groups, go to your agent in the Azure portal and select the **Settings** tab and then **Managed resource groups**.
111
+
112
+
> [!NOTE]
113
+
> Removing resource groups from the list does not remove or otherwise adversely affect resource groups.
114
+
115
+
## Incident management
116
+
117
+
You can diagnose incidents in Azure App Service, Azure Container Apps, Azure Function, Azure Kubernetes Service and Azure Database for PostgreSQL by chatting with the agent directly or by connecting an incident management platform.
118
+
119
+
By default SRE Agent connects to Azure Monitor, but you can also connect it to PagerDuty.
120
+
121
+
### PagerDuty integration
122
+
123
+
To set up SRE Agent with PagerDuty, you need a PagerDuty API key.
124
+
125
+
1. In your SRE Agent resource, go to the *Settings* tab and select **Incident Management**.
126
+
127
+
1. From the *Incident platform* dropdown, select **PagerDuty**.
0 commit comments