Viewing Command Audit Logs of a DCS Redis Instance
Command audit logs record client operations on DCS instances. The storage, query, and analysis of the logs are provided by Log Tank Service (LTS).
- Currently, only DCS Redis 4.0 and later instances in the CN North-Beijing4, CN East-Shanghai1, CN East-Shanghai2, and CN South-Guangzhou regions support command audit logs.
- If the preceding conditions are met but the audit logs are still not displayed on the console, submit a service ticket and contact the customer service to upgrade the minor version of your instance.
Notes and Constraints
- Enabling audit logging will restart all proxy nodes. For single-node, master/standby, and Redis Cluster instances, all DCS Redis nodes will be restarted. Ensure that the client supports retry upon disconnection.
If audit logging has been enabled for an instance and no instance scaling or node migration has been performed, enabling audit logging again will not restart the proxy nodes.
- After audit logging is enabled, if the write traffic or QPS is too high, the performance of the DCS instance may deteriorate and some audit logs may be lost.
- To enable audit logging, you must have the permission to create log groups and log streams in LTS.
- Audit logging can be enabled on a new DCS instance only 10 minutes after the instance is created. Otherwise, the operation may fail.
- By default, audit logs record only write operations.
To record read commands, you can customize the commands in the audit-log-customer-command-list configuration parameter. For details, see Modifying Configuration Parameters of a DCS Instance.
- By default, DCS audit logs are stored for one day. After audit logging is enabled, you can change the retention period of the log group on the LTS console. For details, see Changing the log retention period.
Billing
After audit logging is enabled, a log group, log stream, and dashboard are created on LTS. Fees are generated based on the log volume. For details, see LTS pricing details.
Procedure
- Log in to the DCS console.
- Click
in the upper left corner of the console and select the region where your instance is located. - In the navigation pane, choose Cache Manager.
- Click the name of a DCS instance to go to the instance details page.
- Choose Logs > Audit Logs.
- Click Enable Audit Logging if required.
- The corresponding log group and log stream are created on LTS. Write commands are reported to LTS through the proxy nodes.
- View audit logs. Figure 1 Audit logs
Follow-up Operations
- Disabling audit logging
To disable the function, click Disable Audit Logging in the upper right corner. After the function is disabled, commands will not be recorded.
- After audit logging is disabled, any logs that have not yet been reported will continue to be reported.
- After audit logging is disabled, the log group and log stream on LTS will not be deleted, and no fees will be incurred for these resources.
- You can manually delete the log group and log stream on the LTS console by referring to Deleting a Log Group and Deleting a Log Stream.
- Changing the log retention period
In the log group list of the LTS console, click Modify in the Operation column of the desired log group to change the log retention period.
Figure 2 Changing the log retention period or deleting a log group
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot