How Do I Make the Log Retention Period 180 Days?
Background
Audit logs may need to be stored for 180 days for query and backtracking purposes. You can perform the following steps to configure the log retention period.
Procedure
After being enabled, CTS automatically creates a management tracker named system and records all operations of your tenant account in the tracker. Configure the tracker for CTS to transfer logs to Log Tank Service (LTS). After the configuration is complete, LTS creates a log group and a log stream automatically and stores CTS audit logs in the log stream for 30 days by default. To store them for 180 days, change the log retention duration setting of the log stream to 180 days on LTS.
- Log in to the management console.
- If you log in to the console using a Huawei Cloud account, directly go to the CTS console.
- If you log in to the console as an IAM user, contact the administrator (Huawei Cloud account or a user in the user group admin) to grant the following permissions to the IAM user. For details, see Assigning Permissions to an IAM User.
- CTS FullAccess
- Click in the upper left corner to select the desired region and project.
- Click in the upper left corner and choose Management & Governance > Cloud Trace Service.
- Click Configure in the Operation column of the system tracker to configure the tracker to transfer audit logs to LTS.
- Enable Transfer to LTS. The system automatically creates a log group CTS and a log stream system-trace on LTS.
Figure 1 Transfer to LTS
- Go to the LTS console, change the storage duration of LTS log streams to 180 days, and configure the structuring rule to CTS.
- Click in the upper left corner and choose Management & Governance > Log Tank Service to access the LTS console.
- On the Log Management page, click the modifying button in the Operation column of the system-trace log stream created in 5. On the displayed page, enable Log Retention Duration and change the duration to 180 days.
Figure 2 Modifying the log stream
Figure 3 Changing the retention period
- Choose Log Ingestion and click CTS (Cloud Trace Service). On the displayed page, select CTS for Log Group and system-trace for Log Stream.
Figure 4 Selecting a log stream
- Click Next: Configure Log Stream to configure the CTS log structuring.
- Click Submit to complete the log ingestion configuration.
- Click Log Streams. The log stream details page is displayed.
Figure 5 Log stream details
Feedback
Was this page helpful?
Provide feedbackThank 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