All Products
Search
Document Center

Managed Service for Prometheus:Deliver data from a Managed Service for Prometheus instance to a self-managed one

Last Updated:Sep 18, 2025

You can use remote write to deliver data from a Prometheus instance created in Alibaba Cloud Managed Service for Prometheus to a self-managed Prometheus instance. This way, you can query or store the metric data of Managed Service for Prometheus instances and self-managed ones in a centralized manner.

Prerequisites

Limitations

  • Prometheus instance data cannot be delivered to a free Prometheus instance.

  • 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 application monitoring

    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.

  • 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

  • Only real-time data generated after you create a delivery task can be exported. Delivering historical data is not supported.

Step 1: Create a delivery task

  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. In the panel that appears, set the Destination Type parameter to Prometheus Remote Write, set other parameter as prompted (you can also set the external_labels parameter), and then click OK.

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

Step 2: Configure the remote write endpoint and authentication

Prometheus instance type

Remote write endpoint

Requirements

Managed Service for Prometheus instance

For more information, see Configure open-source Prometheus to read monitoring data from Managed Service for Prometheus by using a remote read URL.

You must specify an authentication method and an AccessKey pair that has the required permissions. For more information, see View the information about AccessKey pairs of a RAM user.

Self-managed Prometheus instance

For more information, see Open source Prometheus documentation.

  • The version of the Prometheus instance is 2.39 or later.

  • You must configure the out_of_order_time_window setting. For more information, see PromLabs documentation.

  • You must configure the --web.enable-remote-write-receiver startup parameter. For more information, see Prometheus documentation.

Step 3: Configure the network

Prometheus instance type

Network type

Network requirements

Managed Service for Prometheus instance

Internet

None.

VPC

Select a VPC in the same region, and configure the Remote Write URL as the internal endpoint of Service for Prometheus.

Self-managed Prometheus instance

Internet

None.

VPC

Select a VPC and vSwitch that can access the self-managed Prometheus instance. A data delivery task automatically selects an IP address on the chosen vSwitch as the outbound IP address.

Note

Prometheus uses Server Load Balancer (SLB) to expose services. For more information, see Service management.

Step 4: Verify the result

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

  2. In the left navigation pane, click Instances.

  3. Click the name of the Prometheus instance. In the left navigation pane of the page that appears, click Service Discovery.

  4. On the Metrics tab, check whether the metric data is delivered as expected.