Tair provides the audit log feature based on Simple Log Service. This feature allows you to query, analyze, and export log data. Security auditors can use the feature to promptly detect unusual or unauthorized data manipulation activities, and rapidly pinpoint the identity of the user who altered the data and the exact time of alteration. Developers and O&M personnel can use the feature to identify performance-related issues. This feature also empowers business systems to meet security and compliance requirements.
Prerequisites
To enable the audit log feature, a Resource Access Management (RAM) user must have the permissions to manage Simple Log Service.
You can attach the AliyunLogFullAccess system policy to a RAM user. After the RAM user is granted the permissions defined in the system policy, the RAM user can manage all Logstores. For more information, see Grant permissions to a RAM user.
You can also customize a policy to restrict the RAM user to only manage the audit logs of Tair .
Precautions
After you enable the audit log feature for your Tair instance, the system audits and logs the write operations that are performed on the instance. The instance may experience a performance decrease of 5% to 15% and some degree of latency and jitter. The performance decrease and the level of latency and jitter vary based on the amount of data that is written or audited.
ImportantYour application may write large amounts of data to your Tair instance. For example, your application frequently runs the INCR command to increment values. To prevent a performance decrease in such a scenario, we recommend that you enable the audit log feature only for troubleshooting issues or auditing instance security.
Typically, a large number of read operations are performed. If audit information is recorded for a large number of read operations, the instance performance may deteriorate. To prevent this issue, Tair records audit information only for write operations.
When a command has a large number of parameters, the individual parameters are overly lengthy, or the total length of the command is excessively long, the command is not displayed in its entirety within the audit logs. The display format of the command is similar to that of the SLOWLOG command of Redis.
Billing
You are charged for the audit log feature based on the storage usage and log retention period. The price varies based on the region that you select. For more information, see Billable items.
Procedure
Log on to the Tair console and go to the Instances page. In the top navigation bar, select the region in which the instance that you want to manage resides. Then, find the instance and click the instance ID.
In the left-side navigation pane, choose .
Specify a log retention period.
ImportantThe audit log retention period applies to all instances in the current region that have the audit log feature enabled.
The retention period of audit logs can range from 1 day to 365 days.
Click Estimate Fees and Enable Audit Logs.
In the dialog box that appears, estimate log fees, read the prompt, and then click Enable.
NoteThe audit log feature depends on Log Service. If Simple Log Service is not activated for your Alibaba Cloud account, you are prompted to activate Simple Log Service.
Related API operations
API operation | Description |
Enables or disables the audit log feature for a Tair instance and specifies a retention period for audit logs. | |
Queries the audit log settings of a Tair instance. These settings include whether the audit log feature is enabled and the retention period of audit logs. | |
Queries the audit logs of a Tair instance. |