You can use the management account of a resource directory or the delegated administrator account for CloudMonitor to manage the metrics of Alibaba Cloud services across accounts. You can import the metrics to a namespace and view the monitoring data in charts. You can use a monitoring dashboard in Hybrid Cloud Monitoring to create custom charts, configure Prometheus alert rules, and receive alert notifications.

Prerequisites

Step 1: Create a metric import task for cross-account monitoring

You can use the management account of a resource directory or the delegated administrator account for CloudMonitor to create a metric import task. You can import the monitoring data of Alibaba Cloud services that belong to specific members in the resource directory to the namespace that you create. Then, you can view the imported monitoring data in charts.

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Hybrid Cloud Monitoring > Namespace.
  3. Optional. Find the namespace and click Manage Import Tasks in the Metric Data column.
    Note This operation is required only if two or more namespaces are displayed on the Namespaces tab.
  4. On the Alibaba Cloud Service Metrics tab, click Import Alibaba Cloud Service Metrics.
  5. On the Alibaba Cloud Data tab, select Other Account and select a member from the Resource Directory Member Account drop-down list.
  6. Select the cloud services and related metrics that you want to import.
  7. Click OK.

Step 2: View the monitoring charts for the metrics of Alibaba Cloud services

You can use the management account or the delegated administrator account to view the monitoring charts for the metrics of Alibaba Cloud services that belong to the selected member.

  1. On the Namespaces tab, find the namespace and click View Data in the Metric Data column.
  2. On the View Data page, select a metric.

Step 3: Create custom charts for the metrics of Alibaba Cloud services

You can use the management account or the delegated administrator account to create a monitoring dashboard for the metrics of Alibaba Cloud services and create custom charts.

  1. In the left-side navigation pane, choose Hybrid Cloud Monitoring > Dashboards.
  2. On the Dashboards tab, click View Dashboard.
  3. In the left-side navigation pane of the dashboard, click the Create icon. Then, click Add new panel.
  4. On the Edit Panel page, configure metrics and monitoring charts.
    • On the Query tab, select the namespace and select metrics.
    • On the Panel tab, specify a panel title and enter a description. Then, configure visualization and other settings.
  5. In the upper-right corner of the Edit Panel page, click Apply.
    The monitoring chart is created.
  6. In the upper-right corner, click the Save the dashboard icon. Then, specify the name of the dashboard and the directory in which the dashboard resides.
  7. Click Save.
    The dashboard is created.
  8. In the left-side navigation pane of the dashboard, choose Dashboard > Manage to view the dashboard.

Step 4: Configure an alert rule for the metrics of Alibaba Cloud services

You can use the management account or the delegated administrator account to configure an alert rule for the metrics of Alibaba Cloud services. If the specified conditions are met, you can receive alert notifications.

  1. In the left-side navigation pane, choose Hybrid Cloud Monitoring > Namespaces.
  2. In the upper-right corner of the Namespaces tab, click Create Alert.
  3. In the Create Alert Rule panel, enter a name in the Rule Name field, select a namespace from the Namespace drop-down list, set the Alert Expression (PromQL) parameter, and then select an alert contact group from the Alert Contact Group drop-down list.
  4. Click OK.