The data export service provides you with access to real-time monitoring data on time series metrics of cloud services. You can subscribe to such monitoring data of a cloud service about which you are most concerned and export the data to a storage service. This topic describes the scenarios and process of the data export service.

Background information

Data export is applicable to the following scenarios:
  • Monitoring and alerting: You can use the data export service to aggregate CloudMonitor data to your monitoring and O&M platforms.
  • Statistical analysis: You can use the data export service to export CloudMonitor data as the data source for statistical analysis.

Procedure

  1. Enable the data storage service.
    Currently, Log Service is supported by the data export service. InfluxDB has entered the internal testing phase, and the support for MaxCompute and Object Storage Service (OSS) is in progress.
    • For more information about Log Service, see What is Log Service?.
    • InfluxDB is an open-source time series database developed by InfluxData. It specializes in high input/output performance, high storage performance, and real-time analysis of a large amount of time series data. InfluxDB is widely used to store monitoring data of systems.
    • For more information about MaxCompute, see What is MaxCompute?.
    • For more information about OSS, see What is OSS?.
  2. Configure the data storage service.
    After enabling the data storage service, you can call an API operation to configure the service as a container for storing exported data. For more information, see PutExporterOutput.
  3. Define the data export rule.

    After configuring the service as a container for storing exported data, you can call an API operation to subscribe to the data that you want to obtain. For more information, see PutExporterRule.

    The exported data includes the monitoring data and export service data. The monitoring data is determined by the definitions and rules of the metrics to which you subscribe. The following table describes the export service data.
    Parameter Description
    cms_namespace The namespace of the metric.
    cms_metric The name of the metric.
    cms_platform The name of the CloudMonitor data processing platform.
    cms_data_filter_rule The information about the data filter.
    cms_data_filter_user_id The ID of the user who filters data.
    cms_exporter_dispatch_ts The timestamp when the data is distributed.
    cms_tumbling_window The time window for calculating metrics.
    For example, the configured data storage service is as follows:
    DestName:DemoDest
    ConfigJson:
    {
        "logstore": "sls_logstore_name",
        "ak": "access_key",
        "project": "sls_project_name",
        "as": "access_secret",
        "endpoint": "http://sls-endpoint.log.aliyuncs.com"
    }
    DestType:sls
    Desc:Demo
    The subscribed metric is as follows:
    Project (Namespace): acs_ecs_dashboard
    Metric: CPUUtilization
    Description: The CPU usage.
    Unit: percent
    Dimensions: instanceId
    Statistics: Average, Minimum, Maximum
    For more information about the key metrics of cloud services, see Major metrics of Alibaba Cloud services.
    The subscription rules are as follows:
    RuleName:DemoExporterRule
    DstNames:DemoDest
    Namespace:acs_ecs_dashboard
    MetricName:CPUUtilization
    TargetWindows:60
    Describe:demo
    A sample of exported data is as follows:
    cms_data_filter_rule:DemoExporterRule
    cms_data_filter_ts:158434268****
    cms_data_filter_user_id:127067667954****
    cms_exporter_dispatch_ts:158434268****
    cms_metric:CPUUtilization
    cms_namespace:acs_ecs_dashboard
    cms_platform:blink
    cms_tumbling_window:60
    instanceId:i-2zefuqggczshldq*****
    Maximum:4.47388452258
    Minimum:4.47388452258
    Average:4.47388452258
    userId:12706766795*****

What to do next

Modify or delete a data export rule.

The data export rules that you have configured cannot be modified directly by calling the relevant API operation. However, you can call the relevant API operation to delete the rules to be modified and then configure new data export rules. For more information about how to delete a data export rule, see DeleteExporterRule.