Modify a data delivery task
You can modify the configuration of an existing data delivery task in the console.
Prerequisites
-
You have purchased both Log Service and TSDB.
-
Data delivery across regions is not supported.
-
You have created a data delivery task.
Update a task
When you create a TSDB delivery task in the Log Service console, you can configure task details such as the destination TSDB instance, the delivery start time, and the target TSDB topic.
Follow these steps to update a task.
Log Service console
-
Go to the Log Service console and select the Project and Logstore for the delivery task.
-
In the Logstore drop-down list, under the TSDB Group, select the task to update. The TSDB Delivery Overview page opens, displaying details such as basic information, consumption progress, and storage destination.
-
Click Modify Delivery Configuration to go to the task configuration page.
Task update console
The Authorization Information dialog box appears. Enter your account's Access Key information and click Submit. After verification, the console loads the task configuration for you to modify.
Configure the task by using the parameters described below:
Parameters
|
Parameter
|
Description |
|---|---|
|
Delivery name |
The task name (cannot be modified). |
|
Delivery description |
The task description. |
|
TSDB instance |
A list of TSDB instances in the current region. Select the instance to which you want to export data. |
|
Metric name |
The destination TSDB metric. |
|
AccessKey ID |
Your account's AccessKey ID, used for accessing TSDB. |
|
AccessKey Secret |
Your account's AccessKey Secret, used for accessing TSDB. |
|
Timestamp mapping |
Maps the timestamp in a log record to the TSDB timestamp. By default, the log event time is used as the TSDB timestamp ( |
|
Field mapping |
Map log fields to their corresponding TSDB fields. Enter the log field name in the first box and the TSDB field name in the second. If only a single field mapping exists, data is exported in the TSDB single-value model (the TSDB field name must be |
|
Tag mapping |
Define the TSDB tags for the exported data. Enter the tag name in the first box and the tag value in the second. Both the tag name and value support expressions. |
|
Delivery time |
The start time for data delivery. Data with timestamps earlier than this time will not be delivered. |
TSDB automatically creates a metric if it does not already exist. The timestamp mapping determines the timestamp for each data point. By default, this is the original log's timestamp (${logTag:__time__}). Because the default timestamp is only accurate to the second, multiple log entries within the same second might overwrite each other. To prevent this, you can specify a log field with millisecond precision as the timestamp. You can use expressions like ${logTag:xx} and ${logColumn:xx} for the mapping. The referenced field must be a numeric value representing an Epoch time in seconds or milliseconds. If an expression fails to resolve, the mapping defaults to the original log time (${logTag:__time__}).
Expression reference
During task configuration, the timestamp mapping and tag mapping settings support expressions to reference values from the log data. The syntax is as follows:
${context:variable}
-
Use the
logColumnprefix to reference a column value from the Log Service log. -
Use the
logTagprefix to reference a tag value from the Log Service log.
Log Service provides several common tags that are always present:
-
__topic__: The topic of the LogGroup. Expression format:${logTag:__topic__}. -
__source__: The IP address of the machine that generated the log record. Expression format:${logTag:__source__}. -
__time__: The timestamp of the log record (in seconds). Expression format:${logTag:__time__}.
Submit the task
After you configure all parameters, click Submit to update the data delivery task.
Notes
-
After a TSDB delivery task is updated, configurations do not take effect immediately. To apply the new settings, you must manually stop and then restart the task from its page in the console.
-
To pause the task or check its status, click the task name in the Log Service console to open the task management panel.