Querying and Managing Logstash Cluster Logs
CSS provides log backup and search functions to facilitate troubleshooting and maintenance purposes. You can have cluster logs periodically backed up to OBS buckets and download log files from OBS to analyze and locate faults.
Backing up logs in OBS buckets may incur extra fees. For details, see Billing Modes.
Querying Logs
- Log in to the CSS management console.
- Choose Clusters in the navigation pane. On the Clusters page, click the cluster whose logs you want to query. The cluster information page is displayed.
- In the navigation pane on the left, choose Log Management.
- Query logs on the log management page.
- Select the target node, and click . The query result is displayed.
When you search for logs, the latest 10,000 logs are matched, but only a maximum of 100 logs will be displayed.
Backing Up Logs
CSS cluster logs can be periodically backed up to specified OBS buckets.
- Log in to the CSS management console.
- Choose Clusters in the navigation pane. On the Clusters page, click the name of the target cluster. The cluster information page is displayed.
- Click the Logs tab and toggle on the Log Management switch.
- In the Edit Log Backup Configuration dialog box, set the parameters.
In the displayed dialog box, OBS Bucket, Backup Path, and IAM Agency are automatically created for log backup. You can change the default values by referring to Table 1.
If Log Backup has been enabled for the cluster, you can click the Edit icon 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.
Table 1 Configuring log backup 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.
Backup Path
Storage path of logs in the OBS bucket
The backup path cannot:- Contain the following characters: \:*?"<>|
- Start with a slash (/).
- Start or end with a period (.).
- Exceed 1023 characters.
IAM Agency
IAM agency authorized by the current account for CSS to access or maintain data stored in OBS buckets.
- If you are configuring an agency for the first time, click Automatically Create IAM Agency to create css-obs-agency.
- If there is an IAM agency automatically created earlier, you can click One-click authorization to delete the OBS Administrator permissions, and add the following custom policies instead to implement more refined permissions control.
"obs:bucket:GetBucketLocation", "obs:object:GetObjectVersion", "obs:object:GetObject", "obs:object:DeleteObject", "obs:bucket:HeadBucket", "obs:bucket:GetBucketStoragePolicy", "obs:object:DeleteObjectVersion", "obs:bucket:ListBucketVersions", "obs:bucket:ListBucket", "obs:object:PutObject"
- To use Automatically Create IAM Agency and One-click authorization, the following minimum permissions are needed:
"iam:agencies:listAgencies", "iam:roles:listRoles", "iam:agencies:getAgency", "iam:agencies:createAgency", "iam:permissions:listRolesForAgency", "iam:permissions:grantRoleToAgency", "iam:permissions:listRolesForAgencyOnProject", "iam:permissions:revokeRoleFromAgency", "iam:roles:createRole"
- To use an IAM agency, the following minimum permissions are needed:
"iam:agencies:listAgencies", "iam:agencies:getAgency", "iam:permissions:listRolesForAgencyOnProject", "iam:permissions:listRolesForAgency"
- Back up logs.
- Automatically backing up logs
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 the Edit icon on the right of the parameter to change the backup start time.
- Manually backing up logs
On the Log Backup tab page, click Back Up. In the displayed dialog box, click Yes to start backup.
If Task Status in the log backup list is Successful, the backup is successful.
If log backup fails, click on the right of the Log Backup tab to view the number of failed tasks and learn the failure causes. A maximum of 10 failed tasks can be displayed. When log backup is disabled or the cluster is deleted, the failure records are also cleared.
- Automatically backing up logs
- View log files.
After logs are successfully backed up, you can click OBS Buckets to go to the bucket list, and find the bucket that stores the log files to view log files.
Figure 1 Accessing OBS
Log Files
Deprecation logs and run logs are backed up for Logstash clusters.
Log Name |
Description |
---|---|
logstash-deprecation.log |
Deprecation log |
logstash-plain.log |
Logstash run log |
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