Tutorial: How to monitor Spring Cloud resources using alerts and action groups
This article applies to: ✔️ Java ✔️ C#
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.
There are two steps to set up an alert pipeline:
- 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.
- Set up Alert rules. The rules bind metric patterns with the action groups based on target resource, metric, condition, time aggregation, etc.
In addition to the Azure Spring requirements, the procedures in this tutorial work with a deployed Azure Spring Cloud instance. Follow a quickstart to get started.
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.)
Navigate from a resource group to your Spring Cloud instance. Select Alerts in the left pane, then select Manage actions:
Set up Action Group
To begin the procedure to initialize a new Action Group, select + Add action group.
On the Add action group page:
Specify an Action group name and Short name.
Specify Subscription and Resource group.
Specify Action Name.
Select Action Type. This will open another pane on the right to define the action that will be taken on activation.
Define the action using the options in the right pane. This case uses email notification.
Click OK in the right action pane.
Click OK in the Add action group dialog.
Set up Alert
The previous steps created an Action Group that uses email. You could also use phone notification, webhooks, Azure functions, and so forth. The following steps configure an Alert.
navigate back to the Alerts page, and click Manage Alert Rules.
Select the Resource for the alert.
Click + New alert rule.
On the Create rule page, specify the RESOURCE.
The CONDITION setting provides many options for monitoring your Spring Cloud resources. Click Add to open the Configure signal logic pane.
Select a condition. This example uses System CPU Usage Percentage.
Scroll down the Configure signal logic pane to set the Threshold value to monitor.
For details of the conditions available to monitor, see User portal metrics options.
Under ACTIONS, click Select action group. From the ACTIONS pane select the previously defined Action Group.
Scroll down, and under ALERT DETAILS, name the alert rule.
Set the Severity.
Click Create alert rule.
Verify that the new alert rule is enabled.
A rule can also be created using the Metrics page:
In this tutorial you learned how to set up alerts and action groups for an Azure Spring Cloud application. To learn more about action groups, see: