Retention time of application logs under differentiated configuration items
When no project policy is set, the retention time of application logs on the platform is determined by the Application Log Retention Time of the Log Storage Plugin deployed on the Storage Cluster selected when the Log Collection Component is deployed in the cluster where the application is located.
You can customize the retention time of application logs under a project on the platform by adding and managing project log policies with differentiated settings.
Note:
-
You can update the Configuration parameter of the Log Storage Plugin deployed on the log storage cluster to uniformly update the Application Log Retention Time of the cluster that uses the storage.
-
Project policies only take effect on application logs under a specific project. After a project policy is set, the retention time of all application logs under the project is subject to the project policy.
Add project policy
Tip: After a project policy is added successfully, all applications under the project will be executed according to the project policy. The original logs cannot be queried.
Procedure
-
In the left navigation bar, click Operations Center > Log > Policy Management.
-
Click the Project drop-down list and select a project.
-
Set the Log Retention Time.
Click-/+on both sides of the counter to decrease/increase the retention days, or directly enter a value in the counter. The platform supports a retention time range of 1-30 days.
When a decimal value is entered, it will be rounded up to an integer; when the value is less than 1, it will be rounded up to 1 and-cannot be clicked; when the value is greater than 30, it will be rounded up to 30 and+cannot be clicked. -
Click OK to add the project policy.
-
Click Add.
Update project policy
Support updating the added project policy.
Procedure
-
In the left navigation bar, click Operations Center > Log > Policy Management.
-
Click Update on the right side of the policy to be updated
. -
After setting the Log Retention Time, click Update.
Deactivate the project strategy
After deactivating the project strategy, the log retention time of all applications under the project will be based on the settings in the global policy.
Procedure
-
In the left navigation bar, click Operations Center > Log > Policy Management.
-
Click Deactivate on the right side of the policy to be deactivated
, and confirm.