You can use the data delivery feature of Managed Service for Prometheus (Prometheus) to export monitoring data from a Prometheus instance to MaxCompute and then consume the data based on your business requirements. MaxCompute can process big data ingested from other data sources for data analysis and reports.
Prerequisites
A Prometheus instance is created. For more information, see the following:
An Apsara MQ for Kafka instance is created and a topic is created. For more information, see Overview.
Function Compute (FC) is activated. For more information, see Step 1: Activate Function Compute.
EventBridge is activated. For more information, see Activate EventBridge and grant permissions to a RAM user.
NoteThis feature requires EventBridge (commercially available since June 3, 2025). Refer to EventBridge fees for billing details.
Limitations
When you deliver the data in the virtual private cloud (VPC), if the VPC where the Prometheus instance resides is not the same as the target VPC, ensure that the IP address of the vSwitch in the target VPC has been added to the whitelist of the Prometheus instance. Otherwise, network connection may fail.
On the vSwitch page in the VPC console, you can obtain the CIDR block of the vSwitch.

The following table lists the instances that support data delivery.
Instance
Description
Prometheus for Alibaba Cloud services
The free instance, except for those starting with the name cloud-product-prometheus.
Prometheus for container services
N/A
Prometheus for Flink Serverless
N/A
Prometheus for Kubernetes
N/A
General-purpose Prometheus instance
The general-purpose instance, except for those whose data is reported through OpenTelemetry endpoints.
Only real-time data generated after you create a delivery task can be exported. Delivering historical data is not supported.
Billing
When you import data to MaxCompute, a Function Compute (FC) service is created. The prefix of the service is {task_name}_SINK_FC_TO_MAXCOMPUTE. Function Compute (FC) is used to write the monitoring data to MaxCompute. Therefore, a Function Compute fee is charged. Monitoring data is sent to Function Compute (FC) in batches. Therefore, the less number of times Function Compute (FC) is called, the less fee is charged. You can log on to the Function Compute console to view the status of the current Function Compute resource.
Step 1: Prepare MaxCompute resources
Read the MaxCompute documentation and choose any method to connect to a MaxCompute project. For more information, see Select a connection tool.
Determine the table schema: Map a column in the table schema to the tag name of the metric exported from Prometheus. If no metric value matches a column, a null value is inserted to the column. If multiple metrics are exported, the corresponding column name must be a union of the tag names of all metrics.
For example, you need to export the following two types of metrics:
You need to create a SQL table in MaxCompute based on the following example. For more information, see the Use the SQL Analysis section of the SQL Analysis topic.
CREATE TABLE metric (
__name__ VARCHAR(50) NOT NULL,
cluster_id VARCHAR(50),
host VARCHAR(50),
node_id VARCHAR(50),
job VARCHAR(50),
instance VARCHAR(50),
cpu VARCHAR(50),
__value__ DOUBLE,
timestamp BIGINT
);Make sure that at least the following columns exist: __name__, __value__, and timestamp. These are basic tags used in Prometheus monitoring data. We recommend that you define the table schema based on your business requirement and make sure that all tags are mapped to columns in the table. If a key tag is not mapped, the table will receive large amounts of duplicate data.
Step 2: Create a data delivery task
Log on to the Managed Service for Prometheus console.
In the left navigation pane, click Data Delivery.
On the Data Delivery page, select a region in the top navigation bar and click Create Task.
In the dialog box that appears, set the Task Name and Task Description parameters, and click OK.
On the Edit Task page, configure the data source and event target.
Click + Add Data Source, set the parameters, and then click OK. The following table lists the parameters.
Parameter
Description
Example
Prometheus Instance
The Prometheus instance whose data you want to deliver.
c78cb8273c02*****
Data Filtering
The label of the metric to be filtered.
Regular expressions are supported. Use line breaks to separate multiple conditions. The data can be delivered only when the relationship among the conditions is Logical AND.
__name__=AliyunEcs_CPUUtilization|AliyunEcs_memory_usedutilization regionId=cn-hangzhou id=i-2ze0mxp.*Data Labeling
The label you add to metric data to be delivered. Use line breaks to separate multiple labels.
deliver_test_key1=ssss deliver_test_key2=yyyyClick Add Target, set the Destination Type parameter to MaxCompute, specify the required information, and then click OK.
On the Edit Task page, click OK and Save.
Step 3: Verify that monitoring data is imported to MaxCompute
In the SQL code editor, enter the following SQL statement to query data in the metric table and click Run. On the Run Result tab, you can view the query result.
select * from metric limit 20;