This topic describes how to integrate your Flink workspace with Application Real-Time Monitoring Service (ARMS), specifically, one of its sub-service, Managed Service for Prometheus. After alert rules are created, this monitoring service can monitor performance metrics of Flink in real time.
Prerequisites
Managed Service for Prometheus is activated. For more information, see the Activation method section of the Prometheus Instance Billing topic.
Realtime Compute for Apache Flink is activated. For more information, see Activate Realtime Compute for Apache Flink.
Resource Center is activated. For more information, see Activate Resource Center.
Procedure
Log on to the console of Managed Service for Prometheus. In the left-side navigation pane, click Integration Center.
In the search box, enter "flink". Choose the Alibaba Cloud Flink Service Monitor card.
In the Alibaba Cloud Flink Service Monitor dialog box, select the Start Integration tab. Select the target Flink workspace from the drop-down list. Click OK.

The integration takes one to two minutes. Dashboard data is not available until integration is complete.
View a dashboard
Managed Service for Prometheus offers three built-in dashboards for Flink: Flink Monitoring, Flink Session Cluster Monitoring, and Flink Change Data Capture Monitoring. To view a dashboard, perform the following steps:
Log on to the console of Managed Service for Prometheus. In the left-side navigation pane, click Integration Management.
On the Integration Management page, select the Integrated Environments tab. Choose Cloud Service Region below the tab bar. Then, click the name of your Flink workspace.
Select the Component Management tab. In the Addon Type section, select Dashboards. The built-in Prometheus dashboards for Flink are displayed.

Create alert rules
Log on to the console of Managed Service for Prometheus. In the left-side navigation pane, click Instances.
Click the target instance. The instance details page appears.
In the left-side navigation pane, select Alert rules. Then, click Create Prometheus Alert Rule. Configure the parameters as needed:
Check Type: You can select Static Threshold or Custom PromQL for metrics except those already supported by Realtime Compute for Apache Flink.
Filter Conditions: Set the Namespace parameter to the name of the target Flink namespace. Set the Deployment Name parameter to the value of the Deployment ID parameter in the Basic section of the Configuration tab on the Deployments page. If you select Equal, the alert rule applies to the specific deployment.
For more information about the parameters, see Create an alert rule for a Prometheus instance.