Transferring Logs to DWS
GaussDB(DWS) is an online data processing database that uses the Huawei Cloud infrastructure to provide scalable, fully-managed, and out-of-the-box analytic database service. Transferring logs to GaussDB(DWS) allows you to transfer structured fields in logs to GaussDB(DWS) database tables. You can determine whether to transfer logs to GaussDB(DWS) as required.

Currently, this function is available only in regions CN North-Beijing4, CN East-Shanghai1, CN South-Guangzhou, and AP-Singapore. To use this function in other regions, submit a service ticket.
Prerequisites
- Logs have been ingested to LTS.
- Structuring rules have been configured for log streams.
- You have purchased a dedicated load balancer.
- Create a GaussDB(DWS) cluster with coupled storage and compute and bind it to the load balancer. Currently, a GaussDB(DWS) cluster cannot be bound to a load balancer if they are in different VPCs.
Transferring Logs to DWS
- Log in to the LTS console. In the navigation pane on the left, choose Log Transfer.
- On the Log Transfer page, click Configure Log Transfer in the upper right corner.
- On the Configure Log Transfer page, select DWS Cluster for Transfer Destination and configure parameters.
Table 1 Transfer parameters Parameter
Description
Example Value
Enable Transfer
Whether log transfer is enabled.
Enabled
Transfer Destination
Select a cloud service to which logs are transferred.
DWS Cluster
Log Group Name
Select a log group.
-
Enterprise Project Name
Select an enterprise project.
- This parameter is displayed only when the enterprise project function is enabled for the current account.
- If the enterprise project function is enabled for the current account:
- All enterprise projects under the current account are displayed in the drop-down list 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.
default
Log Stream Name
Select a log stream.
Log streams that have been configured with DWS cluster transfer settings cannot be configured again.
-
Cluster
Name of the created cluster.
test
Database
Database name of the cluster. There are two database types: gaussdb and postgres. The default cluster database is gaussdb.
gaussdb
Username
Username of the database administrator.
lts-test
Password
Password of the database administrator.
-
Schema
Name of a collection of database objects.
-
Table
Name of a table in the schema.
-
Field Mapping
Maps built-in fields and structured fields and types configured in logs to database fields.
There are 13 built-in fields: hostIP, hostId, hostName, pathFile, collectTime, clusterName, clusterId, podName, containerName, regionName, projectId, logGroupName, and logStreamName.
Structured fields in logs can be transferred to GaussDB(DWS) only when the structured field type and the database table field type are the same.
- Click
of the structured field and table field drop-down lists to select the fields to transfer.
- Click
in the Operation column to delete a field that does not need to be transferred.
- Click
to add fields to be transferred.
hostIP
- Click OK.
After a transfer task is created, you can view, modify, and delete it.
After a transfer task is deleted, the logs that have been transferred remain in DWS.
Deleting a transfer task will stop log transfer, and the deleted task cannot be restored. Exercise caution when performing this operation.
Helpful Links
- If you have any questions when configuring log transfer, see Log Transfer in the FAQ.
- You can create, query, and delete log transfer tasks by calling APIs. For details, see Log Transfer.
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