This topic describes how to integrate observable metrics and logs from ApsaraDB RDS into CloudMonitor 2.0 to monitor your ApsaraDB RDS instances.
Prerequisites
To integrate metrics, you must activate Managed Service for Prometheus and Hybrid Cloud Monitoring.
Limits
If you use a RAM user for integration, you must grant the
AliyunCloudMonitorFullAccesssystem policy and theAliyunLogArchiveRolerole.For information about the RDS instance types that support the SQL Audit feature, see MySQL feature overview, PostgreSQL feature overview, and SQL Server feature overview.
Error logs and slow query logs are supported only for MySQL and PostgreSQL instances.
If you stop collecting RDS audit logs, you must manually disable SQL Explorer and Audit in the RDS console.
Billing
Metric integration incurs fees for real-time export from Hybrid Cloud Monitoring and Managed Service for Prometheus. Integrating second-level metrics from CloudMonitor incurs fees for second-level monitoring in Hybrid Cloud Monitoring.
The SQL audit log collection feature of CloudLens for RDS depends on the SQL Audit feature for PostgreSQL and SQL Server instances, or the SQL Explorer feature for MySQL instances. These features incur fees in RDS. For more information, see Billing items.
After RDS logs are collected by Simple Log Service (SLS), SLS charges you for storage space, read traffic, requests, data transformation, and data shipping. For more information, see Pay-as-you-go.
Data ingestion
Log on to the CloudMonitor 2.0 console. Select a workspace, click Integration Center in the navigation bar, and then click ApsaraDB RDS to start the integration.
Create or select a Policy Name and select an Entitys.
Select the observable data to integrate as needed, and then click Determine.
Observable data
Configuration
RDS metrics
RDS Tag Keys: Specify the key of the instance tag to enrich the metrics. The key-value pair of the tag is automatically added to the metric labels.
HighResolutionMonitor: Specifies whether to integrate second-level metrics of the cloud service. This feature is enabled by default.
After the integration is complete, you can view the integrated entities and their observable data in Entity Explorer or Database Observability.
Storage policy
After you integrate RDS, CloudMonitor creates a corresponding SLS Logstore and a Prometheus instance to store the observable data.
Data type | Default storage location | Notes |
Metrics | Prometheus instance: RegionShare:{{workspaceName}}:{{regionId}} | None |
Audit logs | SLS Project: aliyun-product-data-{{userId}}-{{regionId}} SLS Logstore: rds_audit_log | None |
Error logs and slow query logs | SLS Project: aliyun-product-data-{{userId}}-{{regionId}} SLS Logstore: slow_error_log | None |
Uninstall or modify an integration policy
To cancel the integration of ApsaraDB RDS, go to the Integration Management page in the Integration Center. Find the integration policy, and then click Edit or Delete.