All Products
Search
Document Center

CloudMonitor:Report custom monitoring data

Last Updated:Nov 04, 2024

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 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 > Namespace.

    3. Click Create Namespace.

    4. In the Manage Namespace panel, set the parameters. The following table describes the parameters.

      Table 1. Parameters of a namespace

      Parameter

      Description

      Namespace

      The name of the namespace.

      Data Storage Scheme

      The storage scheme of metric data. Valid values:

      • Log Service: The metric data is stored in the Logstore of a project in Simple Log Service.

      • Cloud Monitoring Storage: The metric data is stored in the private storage space provided by CloudMonitor and can only be accessed and used in the CloudMonitor console.

      Note

      For more information about the storage schemes of metric data, see Storage schemes of metric data in Hybrid Cloud Monitoring.

      Region

      The region where the metric data is stored.

      Retention Period

      The storage duration of metric data in CloudMonitor. Valid values:

      • cms.s1.large (Retention Period 15 Days)

      • cms.s1.xlarge (Retention Period 32 Days)

      • cms.s1.2xlarge (Retention Period 63 Days)

      • cms.s1.3xlarge (Retention Period 93 Days) (default)

      • cms.s1.6xlarge (Retention Period 185 Days)

      • cms.s1.12xlarge (Retention Period 367 Days)

      • cms.s1.36xlarge (Retention Period 1095 Days)

      • cms.s1.60xlarge (Retention Period 1825 Days)

      • cms.s1.120xlarge (Retention Period 3650 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 > Namespace.

    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 Namespace tab.

    3. Select a metric and view the monitoring data.