Log Service provides the CloudLens for PolarDB application. CloudLens for PolarDB allows you to manage PolarDB for MySQL clusters in a centralized manner and collect the slow query logs, error logs, audit logs, and metrics of the clusters. This topic describes the features, assets, billing, and limits of CloudLens for PolarDB.

Features

CloudLens for PolarDB provides the following features:

  • Allows you to manage all PolarDB for MySQL clusters within your Alibaba Cloud account in a centralized manner.
  • Allows you to enable the data collection feature for the slow query logs, error logs, audit logs, and metrics of PolarDB for MySQL clusters with a few clicks. You can also manage the data collection status of the clusters in a centralized manner.
  • Allows you to store, query, and analyze the slow query logs, error logs, audit logs, and metrics of PolarDB for MySQL clusters in real time.
  • Provides various reports.

Assets

  • Logstore
    After you enable the data collection feature for a PolarDB for MySQL cluster in CloudLens for PolarDB, Log Service automatically creates a project whose name is in the aliyun-product-data-<Alibaba Cloud account ID>-<Region ID> format and two Logstores named polardb_audit_log and polardb_log in the region where the cluster resides.
    • polardb_audit_log: This Logstore is used to store the audit logs of PolarDB for MySQL clusters.
      Audit logs are used to review operations and ensure security compliance.
      • Audit logs help security auditors obtain information such as operator identities and time of data modifications, and identify internal risks such as abuse of permissions and execution of non-compliant commands.
      • Audit logs help business systems meet audit requirements to ensure security compliance.
    • polardb_log: This Logstore is used to store the slow query logs and error logs of PolarDB for MySQL clusters.
      • Slow query logs record the requests whose execution time exceeds a specified threshold. You can use slow query logs to resolve performance issues and optimize requests.
      • Error logs record information about execution errors in databases. You can use error logs to identify issues.
  • Metricstore
    The first time you enable the data collection feature for metrics, you must select a region. Then, Log Service creates a project whose name is in the aliyun-product-data-<Alibaba Cloud account ID>-<Region ID> format and a Metricstore named polardb_metric in the region.
    Note Metrics are centrally stored in the region that you select when you enable the data collection feature. After you enable the data collection feature for metrics of other PolarDB for MySQL clusters, Log Service stores all collected metrics in the Metricstore that is created in the selected region. Example: aliyun-product-data-16****50-cn-hangzhou/polardb_metric.
    • polardb_metric: This Metricstore is used to store the metrics of PolarDB for MySQL clusters.

      PolarDB for MySQL provides various metrics to monitor the running status of PolarDB for MySQL clusters.

Billing

  • PolarDB for MySQL

    After you enable the data collection feature for the audit logs of a PolarDB for MySQL cluster, the SQL Explorer feature is automatically enabled in the cluster. You are charged for the SQL Explorer feature based on the storage space that is occupied by audit logs. For more information, see Billable items.

  • Log Service

    After Log Service collects logs from PolarDB for MySQL, you can transform or ship the logs. You can also read streaming data over the Internet. You are charged for data transformation, data shipping, and read traffic over the Internet. The charges are included into your Log Service bills. For more information, see Billable items.

Limits

  • You can collect only the logs and metrics of PolarDB for MySQL clusters.
  • The collection feature for audit logs in CloudLens for PolarDB depends on the SQL Explorer feature of PolarDB for MySQL.

    If the SQL Explorer feature is disabled, CloudLens for PolarDB automatically enables the feature.

  • The following table describes the regions in which CloudLens for PolarDB is supported.
    Cloud type Region
    Alibaba Cloud public cloud China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Chengdu), China (Hong Kong), Singapore (Singapore), Australia (Sydney), Malaysia (Kuala Lumpur), Indonesia (Jakarta), Japan (Tokyo), India (Mumbai), US (Silicon Valley), US (Virginia), Germany (Frankfurt), and UK (London)

Precautions

If you enable a CloudLens application, Log Service automatically checks whether a project whose name is in the aliyun-product-data-<Alibaba Cloud account ID>-cn-heyuan format exists within your Alibaba Cloud account. If the project does not exist, Log Service automatically creates the project.

If you want to delete the project, open the Cloud Shell and run the aliyunlog log delete_project --project_name=aliyun-product-data-<Alibaba Cloud account ID>-cn-heyuan --region-endpoint=cn-heyuan.log.aliyuncs.com command. Replace Alibaba Cloud account ID based on your business scenario.
Notice If you delete the project, all CloudLens applications become unavailable. Proceed with caution.