Simple Log Service (SLS) provides three methods for collecting SQL audit logs from ApsaraDB RDS for MySQL instances. Choose a method based on whether you need cross-account collection, automatic collection, or control over which Logstore receives the logs.
Choose a collection method
| Scenario | Method |
|---|---|
| Collect logs from RDS instances under the same Alibaba Cloud account | CloudLens for RDS |
| Collect logs from RDS instances across Alibaba Cloud accounts or regions | Log Audit Service |
| Manually trigger collection or use an alternative to CloudLens for RDS | Import Data - RDS SQL Audit |
Collection configurations created for CloudLens for RDS and Import Data - RDS SQL Audit are interchangeable — you can apply configurations from one method to the other. Configurations created for Log Audit Service cannot be used with the other two methods.
Collection methods
CloudLens for RDS
CloudLens for RDS is the recommended method for collecting SQL audit logs from RDS instances under a single Alibaba Cloud account. It supports both automatic and manual collection and provides built-in dashboards for monitoring collection status.
To access CloudLens for RDS: log on to the Simple Log Service console, go to the Log Application section, and click CloudLens for RDS.
Log Audit Service
Log Audit Service supports cross-account and cross-region log collection, making it the right choice for centralized audit management across multiple Alibaba Cloud accounts or regions.
To access Log Audit Service: log on to the Simple Log Service console, go to the Log Application section, and click Log Audit Service. For more information, see Log Audit Service overview.
Import Data - RDS SQL Audit
Import Data - RDS SQL Audit is an alternative to CloudLens for RDS. It supports manual collection and lets you specify a Logstore for storing the collected logs.
To access Import Data - RDS SQL Audit: log on to the Simple Log Service console, go to the Import Data section, and click RDS SQL Audit - Cloud Products. For more information, see RDS SQL Audit usage notes.
Capability comparison
| Capability | CloudLens for RDS | Log Audit Service | Import Data - RDS SQL Audit |
|---|---|---|---|
| Specify an ApsaraDB RDS instance to collect logs | Supported | Supported | Supported |
| Specify a Logstore to store logs | Supported | Not supported | Supported |
| Collect SQL audit logs across regions | Not supported | Supported | Not supported |
| Collect SQL audit logs across Alibaba Cloud accounts | Not supported | Supported | Not supported |
| Automatic collection | Supported | Supported | Not supported |
| Manual collection | Supported | Not supported | Supported |
| View collection status in dashboards | Supported | Not supported | Not supported |
Log fields
For a complete list of log fields, see ApsaraDB RDS log fields.