Skip to content

Commit b031e39

Browse files
authored
Merge pull request #96552 from MikeDodaro/alerts-action
New tutorial for Spring alerts, work item: 1642092
2 parents 53dade8 + 62c3654 commit b031e39

File tree

10 files changed

+87
-0
lines changed

10 files changed

+87
-0
lines changed
107 KB
Loading
25.7 KB
Loading
72.7 KB
Loading
77.6 KB
Loading
41.9 KB
Loading
44.6 KB
Loading
96.9 KB
Loading
65.4 KB
Loading
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: "Tutorial: Monitor Azure Spring Cloud resources using alerts and action groups | Microsoft Docs"
3+
description: Learn how to use Spring Cloud alerts.
4+
author: MikeDodaro
5+
ms.author: barbkess
6+
ms.service: spring-cloud
7+
ms.topic: tutorial
8+
ms.date: 11/18/2019
9+
10+
---
11+
# Tutorial: Monitor Spring Cloud resources using alerts and action groups
12+
13+
Azure Spring Cloud alerts support monitoring resources based on conditions such as available storage, rate of requests, or data usage. An alert sends notification when rates or conditions meet the defined specifications.
14+
15+
There are two steps to set up an alert pipeline:
16+
1. Set up an Action Group with the actions to be taken when an alert is triggered, such as email, SMS, Runbook, or Webhook. Action Groups can be re-used among different alerts.
17+
2. Set up Alert rules. The rules bind metric patterns with the action groups based on target resource, metric, condition, time aggregation, etc.
18+
19+
## Prerequisites
20+
In addition to the Azure Spring requirements, this tutorial depends on the following resources.
21+
22+
* A deployed Azure Spring Cloud instance. Follow our [quickstart](spring-cloud-quickstart-launch-app-cli.md) to get started.
23+
24+
* An Azure resource to monitor, for example the database implemented in this article: [How to use Spring Data Apache Cassandra API with Azure Cosmos DB](https://docs.microsoft.com/azure/java/spring-framework/configure-spring-data-apache-cassandra-with-cosmos-db)
25+
26+
The following procedures initialize both **Action Group** and **Alert** starting from the **Alerts** option in the left navigation pane of a Spring Cloud instance. (The procedure can also start from the **Monitor Overview** page of the Azure portal.)
27+
28+
Navigate from a resource group to your Spring Cloud instance. Select **Alerts** in the left pane, then select **Manage actions**:
29+
30+
![Screenshot portal resource group page](media/alerts-action-groups/action-1-a.png)
31+
32+
## Set up Action Group
33+
34+
To begin the procedure to initialize a new **Action Group**, select **+ Add action group**.
35+
36+
![Screenshot portal Add action group](media/alerts-action-groups/action-1.png)
37+
38+
On the **Add action group** page:
39+
40+
1. Specify an **Action group name** and **Short name**.
41+
42+
1. Specify **Subscription** and **Resource group**.
43+
44+
1. Specify **Action Name**.
45+
46+
1. Select **Action Type**. This will open another pane on the right to define the action that will be taken on activation.
47+
48+
1. Define the action using the options in the right pane. This case uses email notification.
49+
50+
1. Click **OK** in the right action pane.
51+
52+
1. Click **OK** in the **Add action group** dialog.
53+
54+
![Screenshot Portal define action](media/alerts-action-groups/action-2.png)
55+
56+
## Set up Alert
57+
58+
The previous steps created an **Action Group** that uses email. You could also use phone notification, webhooks, Azure functions, etc.
59+
60+
To configure an **Alert**, navigate back to the **Alerts** page, and click **Manage Alert Rules**.
61+
62+
![Screenshot Portal define alert](media/alerts-action-groups/alerts-2.png)
63+
64+
1. Select the **Resource** for the alert.
65+
66+
1. Click **+ New alert rule**.
67+
68+
![Screenshot Portal new alert rule](media/alerts-action-groups/alerts-3.png)
69+
70+
1. On the **Create rule** page, specify the **RESOURCE**, **CONDITION**, and **ACTIONS**. From **ACTIONS** pane select the previously defined **Action Group**.
71+
72+
1. Under **ALERT DETAILS**, Name the alert rule.
73+
74+
1. Click **Create alert rule**.
75+
76+
![Screenshot Portal new alert rule](media/alerts-action-groups/alerts-4.png)
77+
78+
Verify that the new alert rule is enabled.
79+
80+
![Screenshot Portal new alert rule](media/alerts-action-groups/alerts-5.png)
81+
82+
## Next steps
83+
* [Create and manage action groups in the Azure portal](https://docs.microsoft.com/azure/azure-monitor/platform/action-groups)
84+
* [SMS Alert Behavior in Action Groups](https://docs.microsoft.com/azure/azure-monitor/platform/alerts-sms-behavior)
85+
* [Tutorial: Using Distributed Tracing with Azure Spring Cloud](https://docs.microsoft.com/azure/spring-cloud/spring-cloud-tutorial-distributed-tracing)

articles/spring-cloud/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
href: spring-cloud-tutorial-scale-manual.md
2727
- name: Monitor your application using distributed tracing and App Insights
2828
href: spring-cloud-tutorial-distributed-tracing.md
29+
- name: Monitor Spring Cloud resources using alerts and action groups
30+
href: spring-cloud-tutorial-alerts-action-groups.md
2931
- name: Bind your application to Azure CosmosDB
3032
href: spring-cloud-tutorial-bind-cosmos.md
3133
- name: Bind your application with Azure Cache for Redis

0 commit comments

Comments
 (0)