CSS provides log backup and search functions to help you locate faults. You can back up cluster logs to OBS buckets and download required log files to analyze and locate faults.
Select the node, log type, and log level you want to query, and then click . The query result is displayed.
When you search for logs, the latest 10,000 logs are matched. A maximum of 100 logs are displayed.
In the displayed dialog box, OBS Bucket and IAM Agency are automatically created for log backup. You can change the default value by referring to Table 1.
If the Log Management function has been enabled for the cluster, you can click on the right of Log Backup Configuration and modify the configuration in the displayed Edit Log Backup Configuration dialog box. For details, see Table 1.
Parameter |
Description |
Remarks |
---|---|---|
OBS Bucket |
Select an OBS bucket from the drop-down list for storing logs. You can also click Create Bucket on the right to create an OBS bucket. |
The OBS bucket and the cluster must be in the same region. NOTE:
To let an IAM user access an OBS bucket, you need to grant the GetBucketStoragePolicy, GetBucketLocation, ListBucket, and ListAllMyBuckets permissions to the user. |
Backup Path |
Storage path of logs in the OBS bucket |
The backup path configuration rules are as follows:
|
IAM Agency |
IAM agency authorized by the current account for CSS to access or maintain data stored in the OBS bucket. You can also click Create IAM Agency on the right to create an IAM agency. |
The IAM agency must meet the following requirements:
|
Click the icon on the right of Auto Backup to enable the auto backup function.
After the automatic backup function is enabled, set the backup start time in the Configure Auto Backup dialog box. When the scheduled time arrives, the system will back up logs automatically.
After the Automatic Snapshot Creation function is enabled, you can click on the right of the parameter to change the backup start time.
On the Log Backup tab page, click Back Up. On the displayed page, click Yes to start backup.
If Task Status in the log backup list is Successful, the backup is successful.
All logs in the cluster are copied to a specified OBS path. You can view or download log files from the path of the OBS bucket.
On the Log Search page, select the target node, log type, and log level, and click . The search results are displayed.
When you search for logs, the latest 10,000 logs are matched. A maximum of 100 logs are displayed.
After backing up logs, you can click Backup Path to go to the OBS console and view the logs.
Backed up logs mainly include deprecation logs, run logs, index slow logs, and search slow logs. Table 2 lists the storage types of the OBS bucket.