Downloading MRS Cluster Logs
During MRS cluster O&M, if a cluster service becomes abnormal or a fault needs to be diagnosed, administrators typically need to collect service logs from multiple nodes for analysis. Manually logging in to each node to retrieve logs is inefficient and may result in missing critical log files. To address this issue, Manager provides a batch log download feature. With a single click, you can export logs generated by all instances of each service role without logging in to individual nodes. In addition, you can specify the time range and service scope to perform precise log collection.
This section describes how to download MRS cluster logs using Manager.
Concepts
- AK/SK: Access Key ID (AK) and Secret Access Key (SK) are the access credentials used by Huawei Cloud. They identify users and authenticate API requests. In versions earlier than MRS 3.x, AK/SK credentials are required for identity authentication when logs are uploaded to OBS.
- Object Storage Service (OBS): Provides massive, secure, highly reliable, and cost-effective data storage capabilities.
- Parallel file system: An optimized OBS bucket type that supports mounting as a file system and file system-like operations. It is suitable for scenarios such as big data analytics.
- Topology information: When logs are downloaded, Manager automatically generates a cluster topology file containing the IP address, host name, and service instance information of each node. This information helps you understand the cluster topology during log analysis.
Prerequisites
- For clusters of versions earlier than MRS 3.x, you need to obtain the AK and SK of the account and create a parallel file system in OBS before uploading logs to OBS.
- You are advised to download logs during off-peak hours to prevent log collection from occupying cluster resources and affecting service running.
Downloading MRS Cluster Logs (MRS 3.x or Later)
All service logs within the specified range will be collected during log download. The log files may be large (especially when the time range is long). The download process will occupy network bandwidth and local storage space. You are advised to set a proper time range to avoid downloading too many logs at a time.
- Log in to FusionInsight Manager of the MRS cluster.
For details about how to log in to FusionInsight Manager, see Accessing MRS Manager.
- Choose O&M > Log > Download.
- Select a log download range.
Table 1 Parameters for downloading logs Parameter
Description
Service
Optional. Select the service whose logs need to be downloaded. If you do not select any service, logs of all services will be downloaded by default.
Hosts
Optional. Enter the IP addresses of the hosts where the service is deployed. You can also select the hosts. If this parameter is left blank, logs of all hosts will be downloaded by default.
Maximum Concurrency
Optional. Enter the maximum number of nodes whose logs can be concurrently collected. This parameter determines the log collection speed. It is available in MRS 3.3.0 and later versions.
Start Time
Set the start time for log collection by clicking the icon in the upper right corner.
End Time
Set the end time of log collection by clicking the icon in the upper right corner.
- Click Download.
The downloaded log package contains the topology information of the start time and end time, helping you quickly find the log you need.
The topology file is named in the format of topo_<Topology structure change time>.txt. The file contains the node IP address, host name, and service instances that reside on the node. (OMS nodes are identified by Manager:Manager.)
Example:
192.168.204.124|suse-124|DBService:DBServer;KrbClient:KerberosClient;LdapClient:SlapdClient;LdapServer:SlapdServer;Manager:Manager;meta:meta
After the download is complete, check whether the log package is successfully received on the local PC. After the decompression, check whether the topology file (topo_*.txt) contains information about each node and whether the log file contains service logs generated within the specified time range.
If the download fails, view the task status and error information on Manager.
Downloading MRS Cluster Logs (Versions Earlier Than MRS 3.x)
- You have obtained the access key ID (AK) and secret access key (SK) of the account.
- A parallel file system has been created in OBS.
- Log in to MRS Manager by referring to Accessing MRS Manager and click System.
- Click Export Log under Maintenance.
- Select a service for Service. Set Host to the IP address of the host where the service is deployed. Select the corresponding time for Start Time and End Time.
- In Export To, select a path for storing logs.
This parameter is available only for clusters with Kerberos authentication enabled. For clusters with Kerberos authentication disabled, logs are downloaded to the local PC by default.
Table 2 Export type description Export Type
Description
Follow-up Operations
Local PC
Saves logs to the local PC.
The download is completed automatically.
OBS
Saves logs to OBS.
You need to set the OBS path, bucket name, AK, and SK, and then proceed to Step 5.
- Set OBS Path to the OBS path for storing service log files.
Table 3 Parameters for downloading logs Parameter
Description
OBS Path
Enter the OBS path for storing service log files. The value must be a full path and cannot start with a slash (/). If the specified path does not exist, the system automatically creates it. The full path of OBS can contain a maximum of 900 bytes.
Bucket
Enter the name of the OBS parallel file system that you have created for storing the log files.
AK
Enter the Access Key ID of the user. To obtain the AK, see How Do I Obtain an AK/SK?
SK
Enter the Secret Access Key of the user. To obtain the SK, see How Do I Obtain an AK/SK?
- Click OK.
If you previously selected to download the log files to the local PC, check whether the log package is successfully received on the local PC. If you previously selected to upload the log files to OBS, log in to the OBS console and check whether the log files have been successfully uploaded to the corresponding parallel file system. If the download fails, check the error message on Manager and locate the causes.
Helpful Links
- For details about how to access Manager of an MRS cluster, see Accessing MRS Manager.
- For details about how to check cluster alarms for associated log analysis, see Viewing Alarms of an MRS Cluster.
FAQs
Q: What should I do if the log download fails due to insufficient disk space?
A: The disk space on the nodes is temporarily required during log collection. Clear redundant files from the nodes or expand the disk capacity, and then try again.
Q: What does the downloaded log package contain?
A: The package contains log files of the selected services and hosts within the specified time range, as well as the cluster topology file (topo_*.txt) that records the IP address, host name, and service instance information of each node.
Q: What should I do if logs fail to be uploaded to OBS?
A: Check whether the AK/SK credentials are valid, the OBS parallel file system exists, the OBS path is properly configured, and network connectivity is normal.
Q: How do I download logs of all services?
A: If you do not select any service, logs of all services will be downloaded by default. You are advised to narrow down the time range to avoid large log files.
What is your overall rating for this page?
Thank 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