No additional headers are required beyond the standard request headers.
Request parameters
Parameter name
Types
Required or not
Parameter location
Description
name
String
Yes
RequestBody
Transmission task name
config
TaskConfig
Yes
RequestBody
Task configuration
hosts
List<Host>
Yes
RequestBody
List of task running hosts
tags
List<Tag>
No
RequestBody
For the tag list to create, see below for specific parameter formats
Host
Parameter name
Types
Description
hostId
String
Host ID
Tag
Parameter name
Types
Description
tagKey
String
The key of the tag, which main contain uppercase and lowercase letters, numbers, Chinese characters, and special characters-_ /., with a length of 1-65.
tagValue
String
The value of the tag, which main contain uppercase and lowercase letters, numbers, Chinese characters, and special characters-_ /., with a length of 0-65.
TaskConfig
Parameter name
Types
Description
srcConfig
SrcConfig
Data source location configuration
destConfig
DestConfig
Destination location configuration
SrcConfig
Parameter name
Types
Description
srcType
String
For host type, enter 'host'; for container type, enter 'container'. (Sidecar mode operates in host mode, and therefore enter 'host'.)
srcDir
String
Source Log Directory: Use glob mode for matching. For multiple directories, separate them with an English semicolon (;).
matchedPattern
String
Source log files, matched by regular expression
ignorePattern
String
Ignored source log file
timeFormat
String
For BOS delivery, process the source file path and date
ttl
Int
Valid log file time range
useMultiline
Bool
Whether the multi-line mode is enabled
multilineRegex
String
Multi-line mode; the first line in regular expression
recursiveDir
Bool
Whether the directory recursion matching is enabled; no directory recursion is added for container collection
processType
String
Processing type, options: none (no processing), json (processed by JSON format), separator (processed by separator), regex (processed by regular expression), kv (processed by key value pair)
processConfig
ProcessConfig
Detailed configuration of data processing
logTime
String
Log time, options: system and logTime, indicating the use of system time and the use of log time respectively
Log matching expression; only logs conforming to the rule are collected
additionConfig
JSON
Add collector parameters
metaEnv
List
Collect the list of environment variables
metaLabel
List
Collect the customized Label list
metaContainer
List
Collect the fixed container metadata
metaToFields
List
Write the collected environment variables into the destination location as fields
HarvesterLimit
Int
Number of files collected in parallel by collector, defaulting to 1. When there are many files and a large log volume, it is recommended to use it with the max_procs parameter: https://cloud.baidu.com/doc/BLS/s/ym53rk1ua
destConfig
Parameter name
Types
Description
destType
String
Destination location type, supporting BLS
logStore
String
Logstore name
rateLimit
Int
Collection rate limit, unit: MB/second
clientCount
Int
Number of clients pushing the server, defaulting to 1. When the log volume is large, the increase of clients will improve data collection speed.
ProcessConfig
Parameter name
Types
Description
regex
String
If the processing type is regex, fill the regular expression
separator
String
If the processing type of separator, specify the separator: “blank”, “comma”, “tab”, “longstring”, “custom”
customSeparator
String
When “separator” is “custom”, fill the customized separator here.
quote
String
Specify quote characters for separator scenarios, options: blank, double quote ("), single quote ('), and custom
kvKeyIndex
Int
Used during KV-based processing, to specify the key group position (start from 1)
kvValueIndex
Int
Used during KV-based processing, to specify the value group position (start from 1)
sampleLog
Int
Log processing example, used to configure keys and dataType in console after processing
keys
String
Column name of processing results
dataType
String
Data type corresponding to each column of processing results, supporting string/int/float/bool
discardOnFailure
Bool
Whether to discard if log processing fails: true: discard; false: return the original value (for BES delivery, log contents shall be processed with the results delivered in JSON format)
keepOriginal
Bool
Whether to retain the original log: true: retain the original log in the @message field of kafka and the @raw field of BLS LogStore; false: not retain the original log upon processing success
Response
Response headers
No additional headers are required beyond the standard response headers.
Response parameters
None
Error code
No other error codes apart from standard error codes.