All Products
Search
Document Center

Managed Service for Prometheus:Create a data delivery task

Last Updated:Aug 29, 2025

You can deliver the data of a Prometheus instance to ApsaraMQ for Kafka, MaxCompute, or another Prometheus instance based on your business requirements. This topic describes how to create a data delivery task and configure an event target.

Prerequisites

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.444.jpg

  • 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.

Procedure

  1. Log on to the Managed Service for Prometheus console.

  2. In the left navigation pane, click Data Delivery.

  3. On the Data Delivery page, select a region in the top navigation bar and click Create Task.

  4. In the dialog box that appears, set the Task Name and Task Description parameters, and click OK.

  5. On the Edit Task page, configure the data source and event target.

    1. 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=yyyy
    2. Click Add Target and configure the event target. We recommend that you use the default settings in the Retry section.

  6. On the Edit Task page, click OK and Save.

  7. The task is in the Not Started state. On the Task Details page, click Enable to start the task. After the task is started, the data will be delivered to the target with a delay of 2 to 5 minutes.

Examples

To make Prometheus instance data compatible with other Alibaba Cloud services, Managed Service for Prometheus uses the JSON format.

  • Prometheus instance data:

    http_requests_total{method="POST", handler="/api/tracks"} 1027 1609459200000
  • Data in the JSON format:

    {
    	"__name__": "http_requests_total",
    	"method": "POST",
    	"handler": "/api/tracks",
    	"value": 1027,
    	"timestamp": 1609459200000
    }