View metrics and configure alerts
You can integrate Serverless Workflow with CloudMonitor. This topic describes how to view metrics for your workflows and configure monitoring alerts after the integration is complete.
View metrics
The CloudMonitor console provides two methods to view metrics for a workflow.
Method 1: Cloud Service Monitoring Dashboard
The Cloud Service Monitoring Dashboard page provides default charts for key metrics.
Log on to the CloudMonitor console. In the left-side navigation pane, choose .
Select a resource by region and name to display its metrics.

Method 2: Custom Dashboards
You can create custom monitoring charts in CloudMonitor. Experienced users can select the desired metric and workflow name to add a chart directly. If you are new to configuring a CloudMonitor dashboard, follow this procedure:
Log on to the CloudMonitor console. In the left-side navigation pane, choose .
Click .
Enter a Board Name and select a Folder. Click OK to create a new, empty dashboard.
To save changes, such as adding, moving, or deleting charts, click Save Dashboard in the upper-right corner. To add a chart, click Add Chart in the center or upper-right corner of the page.
On the new dashboard, click Add Chart. In the Add Chart panel, select a chart type, and then select the cloud product and its metrics.
On the Cloud Service Monitoring tab, select the target cloud product, set a name for the chart, and then select the target metric, its statistical method, and the associated resource.
For more information about the metrics of Alibaba Cloud services, see Cloud Product Monitoring.
Configure the dimension, such as
flowName. Then, click Apply to Dashboard to save the chart.Click Apply to large plate. You can now view the metric curve for the resource on your Custom Dashboards. Repeat these steps to add more charts for other resources or different metrics.

Configure alerts
If you want to configure an alert for a specific condition, for example, to receive a notification when a workflow reaches a certain number of failed executions, follow the steps in this section. Before you begin, ensure you have configured an alert contact. For more information about configuring alerts, see Alert service.
Log on to the CloudMonitor console. In the left-side navigation pane, choose .
On the Application Groups page, click Create Application Group. In the Create Application Group panel, select Manual Create. Specify the Application Group Name and Alert Contact Group, and then click OK.
By default, the Initialize and Install Monitoring Agent and Subscribe to Event Notifications toggles are enabled.
After the group is created, you are redirected to the Group Resources tab of the new Application Group.
Click + Manage Products and Resources. In the Add/Modify Group Resources panel, select Serverless Workflow as the product, choose a region, and then select the workflow you want to monitor. Click OK.
In the left-side navigation pane of the Application group details page, click Alert Rule, and then click + Create Alert Rule. In the Create Alert Rule panel, set the Mute Period, Effective Period, and Alert Contact Group. Click + Add Rule and select a metric type, such as simple metric, combined metric, expression, or smart threshold.
If needed, set tags by specifying a tag key and value. Expand Advanced Settings to configure a webhook (Webhook URL), notification channels (Auto Scaling, Log Service, Message Service MNS—topic, and Function Compute), the recovery notification toggle, and the no data handling method.
In the Configure Rule Description panel, set the metric and threshold, and then click OK.
The panel includes settings for Rule Name, Metric Type (options include simple metric, combined metric, expression, or smart threshold), and the metric to monitor. The Threshold and Alert Level setting supports three levels: Critical (notifications via phone, SMS, email, and webhook); Warn (notifications via SMS, email, and webhook); and Info (notifications via email and webhook). For each alert level, you can configure the number of consecutive periods, the statistical method (for example, average), a comparison operator, and a threshold.
After you click Confirm, CloudMonitor sends notifications to the specified alert contacts whenever the trigger conditions are met.