Export monitoring data from a Prometheus instance to Message Queue for Apache Kafka or MaxCompute for custom processing.
Prerequisites
-
Ensure that a Prometheus instance is connected. For more information, see the following topics:
-
EventBridge is activated and the required permissions are granted for your destination type through the EventBridge console. Activate EventBridge and grant permissions.
NoteData shipping depends on EventBridge, which became commercially available on June 3, 2025. For information about EventBridge billing, see Billing overview.
-
The destination resource is created, such as a Message Queue for Apache Kafka instance or a MaxCompute project. Get started with Message Queue for Apache Kafka or Ship Prometheus data to MaxCompute.
Limits
-
If the Prometheus instance and the destination reside in different VPCs, add the destination vSwitch CIDR block to the Prometheus instance allowlist to avoid network connection failures.
-
Supported data sources:
Instance type
Description
Prometheus for Cloud Services
Excludes free instances whose names start with cloud-product-prometheus.
Prometheus for Container Service
None
Prometheus for Flink Serverless
None
Prometheus for Kubernetes
None
General-purpose
Excludes data reported through OpenTelemetry endpoints.
-
Only real-time data generated after task creation is shipped; historical data is not supported.
Procedure
-
Log on to the Cloud Monitor console.
-
In the left-side navigation pane, click .
-
On the Data Shipping page, select a destination region in the top menu bar and click Create Task.
-
In the dialog box that appears, enter a Task Name and Task description, and click OK.
-
On the Edit Task page, configure the data source and destination.
-
Click + Add Data Source, configure the following parameters, and then click OK.
Parameter
Description
Example
Prometheus Instance
The source Prometheus instance.
c78cb8273c02*****
Data Filtering
Filter data by metric labels. Supports regular expressions. Separate multiple conditions with line breaks (AND logic).
__name__=AliyunEcs_CPUUtilization|AliyunEcs_memory_usedutilization regionId=cn-hangzhou id=i-2ze0mxp.*Data Labeling
Additional labels for shipped metric data. Separate with line breaks.
deliver_test_key1=ssss deliver_test_key2=yyyy -
Click Add Target to configure the destination. Use the default Retry settings.
-
When Target Type is set to ApsaraMQ for Kafka: Ship Prometheus data to Kafka.
-
When Target Type is set to MaxCompute: Ship Prometheus data to MaxCompute.
-
When Target Type is set to Prometheus Remote Write: Ship Prometheus data to a self-managed Prometheus instance.
-
-
-
On the Edit Task page, click OK, and then click Save to create the data shipping task.
-
A new task has the Not Started status. On the Job Details page, click Enable in the upper-right corner to start the task. Data arrives at the destination within 2 to 5 minutes.
Data example
The data shipping feature converts Prometheus metric data into JSON format for compatibility with other Alibaba Cloud services.
-
Original Prometheus metric:
http_requests_total{method="POST", handler="/api/tracks"} 1027 1609459200000 -
Shipped JSON format:
{ "__name__": "http_requests_total", "method": "POST", "handler": "/api/tracks", "value": 1027, "timestamp": 1609459200000 }