You can use the GlobalView feature of Alibaba Cloud Managed Service for Prometheus to create a global aggregation instance in a region to aggregate all Prometheus instances in the region. Global aggregation instances support unified metric query and alerting.
The old version of the GlobalView feature will be phased out. You can use the old version till it is officially retired. We recommend that you use the new version of the GlobalView feature to create global aggregation instances for the monitoring and alerting of Prometheus instances. For more information, see Manage Prometheus instances.
Prerequisites
Multiple Prometheus instances are created. For more information, see Manage Prometheus instances.
Grafana is installed on your on-premises machine. For more information, see Grafana documentation.
View a global aggregation instance
Log on to the ARMS console.
In the left-side navigation pane, choose .
Turn on the switch in the upper-right corner to view the HTTP API URL of the aggregation instance. You can use the HTTP API URL to import the data of the global aggregation instance from Managed Service for Prometheus to your local Grafana system. This way, you can view metric data in a unified manner.
Integrate the global aggregation instance into the Grafana system
Configure the HTTP API URL as a data source in the Grafana system. To configure the data source, perform the following steps:
Log on to the local Grafana system as an administrator.
In the left-side navigation pane, choose .
NoteThis menu is visible only to the administrator.
On the Data sources tab, click Add data source.
On the Add data source page, click Prometheus.
On the Settings tab, enter a name in the Name field and enter the API URL in the URL field.
Click Save & test.
View metric data
After you integrate the global aggregation instance into Grafana, you can use the Explore page to view all metrics of Managed Service for Prometheus, the cloud services that are integrated into Managed Service for Prometheus, and Application Monitoring.
Log on to the local Grafana system.
In the left-side navigation pane, select Explore.
On the Explore page, select PrometheusGlobalView from the top drop-down list. In the Metrics field, enter a metric name and press the Enter key.
In the charts that appear, view the metric data of the global aggregation instance. If no metric data is displayed, check whether the specified API endpoint is valid or whether the data source contains the monitoring data of Managed Service for Prometheus.