You can report custom monitoring data to Hybrid Cloud Monitoring. Then, you can view the monitoring charts of specified metrics on the dashboard.

Prerequisites

Hybrid Cloud Monitoring is activated. For more information, see Activate Hybrid Cloud Monitoring.

Background information

You are not charged for activating Hybrid Cloud Monitoring. You are charged based on the amount of resources that you consume. For more information, see Billing of the enterprise dashboard feature.

Procedure

  1. Install Alibaba Cloud CLI on the server where the custom monitoring data resides.

    For more information, see Windows, Linux, or Install Alibaba Cloud CLI on macOS.

    You can run the aliyun version command to check whether Alibaba Cloud CLI is installed. If the command output shows the current version of Alibaba Cloud CLI, Alibaba Cloud CLI is installed.

  2. Configure the AccessKey pair of the Alibaba Cloud account or RAM user on the server where the custom monitoring data resides.

    For more information about how to obtain the AccessKey pair of the Alibaba Cloud account or a RAM user, see Obtain an AccessKey pair.

    For more information about how to configure an AccessKey pair, see Configure an AccessKey credential.

    If the following information is displayed, the AccessKey pair is configured.
    Configure Done!!!
    ..............888888888888888888888 ........=8888888888888888888D=..............
    ...........88888888888888888888888 ..........D8888888888888888888888I...........
    .........,8888888888888ZI: ...........................=Z88D8888888888D..........
    .........+88888888 ..........................................88888888D..........
    .........+88888888 .......Welcome to use Alibaba Cloud.......O8888888D..........
    .........+88888888 ............. ************* ..............O8888888D..........
    .........+88888888 .... Command Line Interface(Reloaded) ....O8888888D..........
    .........+88888888...........................................88888888D..........
    ..........D888888888888DO+. ..........................?ND888888888888D..........
    ...........O8888888888888888888888...........D8888888888888888888888=...........
    ............ .:D8888888888888888888.........78888888888888888888O ..............
  3. Create a namespace in the CloudMonitor console.
    1. Log on to the CloudMonitor console.
    2. In the left-side navigation pane, choose Hybrid Cloud Monitoring > Namespaces.
    3. Click Create Namespace.
    4. In the Manage Namespace panel, set the parameters. The following table describes the parameters.
      Parameter Description
      Namespace The name of the namespace.
      Retention Period The retention period of metric data in CloudMonitor. Default value: cms.s1.3xlarge (Data storage time 93 days). Valid values:
      • cms.s1.large (Data storage time 15 days)
      • cms.s1.xlarge (Data storage time 32 days)
      • cms.s1.2xlarge (Data storage time 63 days)
      • cms.s1.3xlarge (Data storage time 93 days)
      • cms.s1.6xlarge (Data storage time 185 days)
      • cms.s1.12xlarge (Data storage time 376 days)

      For information about the billing for different retention periods, see Pricing.

      Namespace Description The description of the namespace.
    5. Click OK.
  4. Report custom monitoring data to Hybrid Cloud Monitoring.
    • Report the data of a single metric
      aliyun cms PutHybridMonitorMetricData --region cn-hangzhou --MetricList.1.Name CPU_Usage --MetricList.1.Labels.1.Key=IP --MetricList.1.Labels.1.Value=192.168.XX.XX  --MetricList.1.Value 90 --Namespace 'default-aliyun'
    • Report the data of multiple metrics
      aliyun cms PutHybridMonitorMetricData --region cn-hangzhou --MetricList.1.Name CPU_Usage --MetricList.1.Labels.1.Key=IP --MetricList.1.Labels.1.Value=192.168.XX.XX --MetricList.1.Labels.2.Key=IP --MetricList.1.Labels.2.Value=192.168.XX.XX --MetricList.1.Value 90 --Namespace 'default-aliyun'
  5. View the custom monitoring data in the CloudMonitor console.
    1. In the left-side navigation pane, choose Hybrid Cloud Monitoring > Namespaces.
    2. Optional. Find the namespace and click View Data in the Metric Data column.
      Note This operation is required only if two or more namespaces are displayed on the Namespaces tab.
    3. Select a metric and view the monitoring data.