Enable the log collection feature
CloudLens for Hologres collects SQL audit logs for Hologres instances. You can enable this feature to collect and audit SQL logs.
Prerequisites
You can enable the log collection feature only for Hologres V2.2 and later. If your instance version is V2.1 or earlier, you can upgrade the instance. For more information, see Upgrade instances.
Enable the log collection feature
-
Log on to the Cloud Monitor console.
In the left-side navigation pane, select CloudLens for Hologres from the CloudLens drop-down list.
When you enable the feature for the first time, you must complete authorization as prompted.
NoteAssign the service-linked role AliyunServiceRolePolicyForSLSAudit to CloudLens for Hologres to collect Hologres logs. For more information, see Manage the AliyunServiceRoleForSLSAudit service-linked role.
In the Enable Audit Logs dialog box, click OK.
ImportantAfter you enable SQL audit logs, the Hologres instance automatically restarts. To ensure business stability, we recommend that you enable this feature during off-peak hours.
To disable the log collection feature, click Data Import Management in the left-side navigation pane. On the Hologres Instance tab, find the Hologres instance that you want to manage and click Disable in the SQL Audit Log column.
What to do next
After you enable CloudLens for Hologres, the following operations are available.
Operation | Description |
CloudLens for Hologres displays all eligible Hologres instances in your Alibaba Cloud account. Click a Hologres instance to go to the Hologres console, where you can view instance details and perform operations such as logging on. | |
Select a Hologres instance ID and the corresponding Logstore to view raw logs, statistical charts, log clustering, and field analysis, and to perform query and analysis operations. For more information, seeQuery and analyze logs. | |
The SQL Audit Overview dashboard analyzes audit logs and displays metrics such as user count, audit log volume, client count, and log quantity trends. |