Transferring Logs to OBS
You can transfer logs to OBS and download log files from the OBS console.
To transfer logs, you must have the OBS Administrator permissions apart from the LTS permissions.
Prerequisites
- Logs have been ingested to LTS.
- You have purchased an OBS bucket.
- You will be billed for the storage you use in OBS. For details, see Product Pricing Details.
- Logs cannot be written to an encrypted OBS bucket. If the target OBS bucket is encrypted, disable its encryption on the OBS console before configuring log transfer. If the OBS bucket is encrypted again after the log transfer configuration, subsequent log files will fail to be transferred to the bucket.
Creating a Log Transfer Task
- Log in to the LTS console and choose Log Transfer in the navigation pane on the left.
- Click Create Log Transfer in the upper right corner. Figure 1 Creating a transfer task (OBS)
- On the displayed page, configure parameters.
After a transfer task is created, parameters other than the log source account, agency name, delegator account name, log group name, enterprise project, transfer mode, and log stream name can be modified.
Table 1 Transfer parameters Parameter
Description
Example Value
Log Source Account
- Current: Logs of the current account will be transferred.
- Other: Logs of the delegator account will be transferred. Ensure that the delegator has created an agency for log transfer delegation. For details, see Creating an Agency.
Current
Agency Name
This parameter is required when Log Source Account is set to Other. Enter the name of the IAM agency created by the delegator.
N/A
Delegator Account Name
This parameter is required when Log Source Account is set to Other. Enter the account name of the delegator.
N/A
Log Group Name
Select a log group.
N/A
Enterprise Project Name
Select an enterprise project.
- This parameter is not displayed if the enterprise project function is not enabled for the current account.
- If the enterprise project function is enabled in the current account:
- All enterprise projects under the current account are displayed in the drop-down list box when Log Source Account is set to Current.
- default is displayed when Log Source Account is set to Other and the enterprise project function is not enabled for the delegator account.
- All enterprise projects under the delegator account are displayed when Log Source Account is set to Other and the enterprise project function is enabled for the delegator account.
N/A
Log Stream Name
Select a log stream.
N/A
Transfer Mode
Select a cloud service for log transfer.
OBS
OBS Bucket
- Select an OBS bucket. If no OBS buckets are available, click View OBS Bucket to access the OBS console and create an OBS bucket.
- Only Standard and Infrequent Access OBS buckets are supported in LTS.
N/A
Custom Log Transfer Path
- Enabled: Logs will be transferred to a custom path to separate transferred log files of different log streams. The format is /LogTanks/Region name/Custom path. The file path:
- Must start with /LogTanks/Region name.
- Can contain 1 to 64 characters.
- Is a required parameter.
- Can contain only letters, numbers, hyphens (-), underscores (_), periods (.), and slashes (/).
Example: If you enter LTS-test, the log transfer path will be: LogTanks/RegionName/LTS-test/2019/01/01/Log file name.
- Disabled: Logs will be transferred to the default path. The default path is LogTanks/RegionName/2019/01/01/ Log group/Log stream/Log file name.
LTS-test
Log File Prefix
The file name prefix of the log files transferred to an OBS bucket
The prefix:
- Can contain up to 64 characters.
- Can contain only letters, numbers, hyphens (-), underscores (_), and periods (.).
Example: If you enter LTS-log, the log file name will be: LTS-log_Log file name.
LTS-log
Format
The storage format of logs. The value can be Raw Log Format or JSON.
- The following is an example of the raw log format:
- The following is an example of the JSON format:
{"host_name":"ecs-bd70","ip":"192.168.0.54","line_no":249,"message":"Sep 30 14:40:01 ecs-bd70 CRON[4363]: (root) CMD (/opt/oss/servicemgr/ICAgent/bin/manual/mstart.sh > /dev/null 2>&1)\n","path":"/var/log/syslog","time":1569825602303}
JSON
Whether to Enable Transfer
Whether log transfer to OBS is enabled
Enabled
Transfer Cycle
The interval for automatically transferring logs to OBS buckets. The value can be 2, 5, or 30 minutes, or 1, 3, 6, or 12 hours.
3 hours
- Click OK. When the log transfer status changes to Normal, the transfer task has been created. If you transfer logs of another account, the destination log group and stream belong to the delegator. When you click the name of the delegator's log group or stream on the Log Transfer page, you will be directed to the log group or stream through the agency.
- Click the OBS bucket name in the Transfer Destination column to access the OBS console and view the transferred log files.
Transferred logs can be downloaded from OBS to your local computer for viewing.

Last Article: Overview
Next Article: Transferring Logs to DIS
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.