Monitoring applications across multiple Virtual Private Clouds (VPCs), hybrid data centers, or multi-cloud environments typically requires deploying separate Prometheus, Grafana, and Alertmanager stacks per VPC. Managed Service for Prometheus eliminates this overhead. It collects, stores, and visualizes metrics from all your Elastic Compute Service (ECS) instances through a single platform -- with built-in ECS service discovery, pre-built Grafana dashboards, and default alert templates.
Supported deployment scenarios
| Scenario | Description | Observation scope |
|---|---|---|
| Multi-VPC | Applications distributed across one or more VPCs, with databases, middleware, and business applications on ECS instances in each VPC | Linux or Windows OS metrics, middleware metrics, and application metrics per instance |
| Hybrid cloud | A VPC connected to an on-premises data center. In most cases, you can use a leased line to connect the VPC to the data center. | Unified view of VPC and data center metrics |
| Multi-cloud | A VPC connected to ECS instances on other cloud providers over the Internet | Aggregated cross-cloud metrics from a single platform |
Managed service vs. self-hosted Prometheus
Running your own Prometheus stack across multiple VPCs introduces significant overhead. The following table summarizes the key differences:
| Capability | Self-hosted Prometheus | Managed Service for Prometheus |
|---|---|---|
| Deployment | Separate Prometheus, Grafana, Alertmanager, and exporter deployment per VPC | Single managed platform across all VPCs |
| ECS service discovery | Not built in. Requires custom Golang code calling the ECS POP API, plus compilation and redeployment. | Native aliyun_sd_configs enables flexible target definition and capture based on ECS tags |
| Dashboards | Generic open-source Grafana dashboards, not tailored to Alibaba Cloud components | Pre-built dashboards optimized for each supported exporter |
| Alert templates | Must be created from scratch for each component | Default alert templates for common middleware |
| Maintenance | Manual installation, configuration, and version management | Fully managed by Alibaba Cloud |
Choose a data collection method
Managed Service for Prometheus offers three exporter types. Select the one that matches your use case:
| Exporter type | When to use | How it works |
|---|---|---|
| Managed exporters | Common middleware: MySQL, Redis, Elasticsearch, Kafka, NGINX, MongoDB, PostgreSQL, RabbitMQ, and RocketMQ | Specify the target IP address and port in the console. The service deploys and manages the exporter for you. Also collects metrics from data center components accessible over a leased line. |
| Node Exporter / Windows Exporter | Linux or Windows operating system metrics for each ECS instance | Node Exporter and Windows Exporter cannot be managed because they need to be deployed in each ECS instance to collect observation information from the operating system. Managed Service for Prometheus provides native support for Node Exporter. |
| Unmanaged exporters | Components not covered by managed exporters, or custom application metrics | Deploy your own exporter in the VPC or data center. Then configure custom service discovery in the console so the service can scrape the metrics endpoint. |
Service discovery methods
Managed Service for Prometheus supports two service discovery methods for locating scrape targets:
| Method | Description |
|---|---|
static_configs | Define targets explicitly by IP address and port |
aliyun_sd_configs | Discover ECS instances automatically based on tags |
Set up monitoring
The following steps walk through the complete setup flow: create a Prometheus instance, install an exporter, view dashboards, and configure alerts.
Before you begin, make sure that you have:
An Alibaba Cloud account with ARMS activated
One or more ECS instances running applications or middleware to monitor
Network connectivity between the ECS instances and Managed Service for Prometheus (same VPC, or connected through a leased line)
Step 1: Create a Prometheus instance for ECS
Create a Prometheus instance for ECS in the Managed Service for Prometheus console.
For detailed instructions, see Create a Prometheus instance to monitor an ECS instance.
Step 2: Install and configure an exporter
Managed Service for Prometheus supports the following exporters: Node Exporter, MySQL, Redis, Elasticsearch, Kafka, NGINX, MongoDB, PostgreSQL, RabbitMQ, RocketMQ, and BlackBox.
The following example uses MySQL. The setup process is similar for other managed exporters.
Log on to the ARMS console.
In the left-side navigation pane, choose Managed Service for Prometheus > Instances.
Click the name of the Prometheus instance to open the Integration Center page.
On the Integration Center page, click Install next to MySQL.
In the Integrate MySQL panel, configure the parameters such as the target IP address and port. For parameter details, see Install and configure the MySQL component.
Click OK.
After the exporter is deployed, the Targets tab appears.
Step 3: View dashboards
Managed Service for Prometheus includes pre-built Grafana dashboards for each supported exporter. No separate Grafana installation is required.
On the Integration Center page, find the exporter card in the Installed section.
Click the exporter card, then click the Dashboards tab.
Click the dashboard link to open it in the Alibaba Cloud Grafana page.
Step 4: Configure alerts
On the Alerts tab of the exporter panel, create a Prometheus alert rule for MySQL Exporter to receive notifications when metrics exceed defined thresholds.
For detailed instructions, see Create an alert rule for a Prometheus instance.