CreateLogtailPipelineConfig

Updated at:

Creates a Logtail pipeline configuration.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

log:CreateLogtailPipelineConfig

create

*All Resource

*

  • log:TLSVersion
None

Request syntax

POST /pipelineconfigs HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

project

string

Yes

The name of the project.

test-project

body

object

No

The content of the Logtail pipeline configuration.

configName

string

Yes

The name of the configuration.

Note

The configuration name must be unique within the project to which it belongs and cannot be modified after creation. The naming rules are as follows:

  • The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).

  • The name must start and end with a lowercase letter or a digit.

  • The name must be 2 to 128 characters in length.

test-config

logSample

string

No

The log sample. Multiple logs are supported.

2022-06-14 11:13:29.796 | DEBUG | __main__::1 - hello world

global

object

No

The global configuration.

{ "topicType": "filepath", "topicFormat": "/var/log/(.*).log", "enableTimestampNanosecond": false }

inputs

array<object>

Yes

The list of input plugins.

Important Currently, you can configure only one input plugin.

object

No

The input plugin.

Note

For the parameters of the file input plugin, refer to File plugin. For the parameters of other input plugins, refer to Processing plugin.

{ "Type": "input_file", "FilePaths": ["/var/log/*.log"] }

processors

array<object>

No

The list of processing plugins.

Note

Processing plugins are divided into native processing plugins and extended processing plugins. For more information, refer to Processing plugins.

Important
Note
  • Native plugins can only be used to collect text logs.

  • You cannot add native plugins and extended plugins at the same time.

  • When you use native plugins, the following requirements must be met:
    • The first processing plugin must be a regex parsing plugin, delimiter mode parsing plugin, JSON parsing plugin, NGINX mode parsing plugin, Apache mode parsing plugin, or IIS mode parsing plugin.

    • Only one time parsing plugin, one filtering plugin, and multiple desensitization plugins are allowed after the first processing plugin.

object

No

The processing plugin.

Note

For more information about native processing plugins and extended processing plugins, refer to Processing plugins.

{ "Type": "processor_parse_json_native", "SourceKey": "content" }

aggregators

array<object>

No

The list of aggregator plugins.

Important This is valid only when extended processing plugins are used, and you can use at most one aggregator plugin.

[ { "type": "aggregator_context" } ]

object

No

The aggregator plugin.

{ "type": "aggregator_context" }

flushers

array<object>

Yes

The list of output plugins.

Important Currently, only one flusher_sls plugin is allowed.

object

No

The output plugin.

{ "Type": "flusher_sls", "Logstore": "test" }

task

object

No

The task configuration.

{ "maxLogSize": 524288, "flushIntervalMs": 3000 }

Global configuration

ParameterTypeRequiredDefault valueExampleDescription
TopicTypestringNoEmptyfilepathThe topic type. Valid values:
  • filepath: extracts information from the log file path as the topic. This is valid only when the input plugin is input_file.

  • machine_group_topic: uses the topic of the machine group to which the configuration is applied as the topic.

  • custom: custom topic. For more information, refer to Log topic.

TopicFormatstringNo. Required when TopicType is set to filepath or custom//var/log/(.*).logThe topic format.
EnableTimestampNanosecondboolNofalsefalseSpecifies whether to enable nanosecond precision for timestamps.
PipelineMetaTagKeyobjectNoEmpty{"HOST_NAME":"__hostname__"}
Important Supported only in LoongCollector 3.0.10 and later.
Controls the tags related to the information of LoongCollector itself. The key is the tag parameter name, and the value is the field name of the tag in the log. When the value is __default__, the default value is used. When the value is an empty string, the tag is deleted. You can configure the following tags:
  • HOST_NAME: the hostname. Added by default. Default value: "__hostname__".

  • AGENT_TAG: the custom identifier. Added by default. Default value: "__user_defined_id__".

  • HOST_ID: the host ID. Not added by default. Default value: "__host_id__".

  • CLOUD_PROVIDER: the cloud provider. Not added by default. Default value: "__cloud_provider__".

Input plugins.

File input plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/input_fileThe plugin type. Set the value to input_file.
FilePaths[string]Yes/["/var/log/*.log"]The list of log file paths to be collected. Currently, only one path is supported. You can use the * and ** wildcards in the path. The ** wildcard can appear only once and must be used only before the file name.
MaxDirSearchDepthuintNo00The maximum directory depth for the ** wildcard to match in the file path. This is valid only when the ** wildcard exists in the log path. Valid values: 0 to 1000.
ExcludeFilePaths[string]NoEmpty["/home/admin/*.log"]The blacklist of file paths. The paths must be absolute paths. The * wildcard is supported.
ExcludeFiles[string]NoEmpty["app*.log", "password"]The blacklist of file names. The * wildcard is supported.
ExcludeDirs[string]NoEmpty["/home/admin/dir1", "/home/admin/dir2*"]The blacklist of directories. The paths must be absolute paths. The * wildcard is supported.
FileEncodingstringNoutf8utf8The file encoding format. Valid values: utf8 and gbk.
TailSizeKBuintNo10241024The size from the end of the matched file to the starting collection position when the configuration takes effect for the first time. If the file size is less than this value, the collection starts from the beginning of the file. Valid values: 0 to 10485760. Unit: KB.
MultilineobjectNoEmpty/The multiline aggregation options.
Multiline.ModestringNocustomcustomThe multiline aggregation mode. Valid values: custom and JSON.
Multiline.StartPatternstringRequired when Multiline.Mode is set to customEmpty\d+-\d+-\d+.*The regular expression for the start of a line.
EnableContainerDiscoveryboolNofalsetrueSpecifies whether to enable the container discovery feature. This is valid only when Logtail runs in DaemonSet mode and the collection file path is an in-container path.
ContainerFiltersobjectNoEmpty/The container filtering options. Multiple options are connected by the AND operator. This is valid only when EnableContainerDiscovery is set to true.
ContainerFilters.K8sNamespaceRegexstringNoEmptydefaultFor containers deployed in a Kubernetes environment, specifies the namespace condition of the pod where the container to be collected resides. If this parameter is not added, all containers are collected. Regular expression matching is supported.
ContainerFilters.K8sPodRegexstringNoEmptytest-podFor containers deployed in a Kubernetes environment, specifies the name condition of the pod where the container to be collected resides. If this parameter is not added, all containers are collected. Regular expression matching is supported.
ContainerFilters.IncludeK8sLabelmapNoEmpty/For containers deployed in a Kubernetes environment, specifies the label condition of the pod where the container to be collected resides. Multiple conditions are connected by the OR operator. If this parameter is not added, all containers are collected. Regular expression matching is supported. The key in the map is the pod label name, and the value is the pod label value. Description:
  • If the value in the map is empty, all pods that contain the label with the specified key are matched.

  • If the value in the map is not empty:
    • If the value starts with ^ and ends with $, a pod is matched when the pod has a label with the specified key and the label value matches the regular expression specified by the value.

    • In other cases, a pod is matched when the pod has a label with the specified key and the specified value.

ContainerFilters.ExcludeK8sLabelmapNoEmpty/For containers deployed in a Kubernetes environment, specifies the label conditions to exclude the pods where the containers reside from log collection. Multiple conditions are evaluated with an OR operator. If this parameter is not specified, logs from all containers are collected. Regular expression matching is supported. The key in the map is the pod label name, and the value is the pod label value. Details:
  • If the value in the map is empty, all pods that contain the label specified by the key are matched.

  • If the value in the map is not empty:
    • If the value starts with ^ and ends with $, a pod is matched if it contains the label specified by the key and the label value matches the regular expression specified by the value.

    • In other cases, a pod is matched if it contains the label specified by the key and the label value is exactly the value.

ContainerFilters.K8sContainerRegexstringNoEmptytest-containerFor containers deployed in a Kubernetes environment, specifies the name conditions of the containers from which logs are collected. If this parameter is not specified, logs from all containers are collected. Regular expression matching is supported.
ContainerFilters.IncludeEnvmapNoEmpty/Specifies the environment variable conditions of the containers from which logs are collected. Multiple conditions are evaluated with an OR operator. If this parameter is not specified, logs from all containers are collected. Regular expression matching is supported. The key in the map is the environment variable name, and the value is the environment variable value. Details:
  • If the value in the map is empty, all containers that contain the environment variable specified by the key are matched.

  • If the value in the map is not empty:
    • If the value starts with ^ and ends with $, a container is matched if it contains the environment variable specified by the key and the environment variable value matches the regular expression specified by the value.

    • In other cases, a container is matched if it contains the environment variable specified by the key and the environment variable value is exactly the value.

ContainerFilters.ExcludeEnvmapNoEmpty/Specifies the environment variable conditions to exclude containers from log collection. Multiple conditions are evaluated with an OR operator. If this parameter is not specified, logs from all containers are collected. Regular expression matching is supported. The key in the map is the environment variable name, and the value is the environment variable value. Details:
  • If the value in the map is empty, all containers that contain the environment variable specified by the key are matched.

  • If the value in the map is not empty:
    • If the value starts with ^ and ends with $, a container is matched if it contains the environment variable specified by the key and the environment variable value matches the regular expression specified by the value.

    • In other cases, a container is matched if it contains the environment variable specified by the key and the environment variable value is exactly the value.

ContainerFilters.IncludeContainerLabelmapNoEmpty/Specifies the label conditions of the containers from which logs are collected. Multiple conditions are evaluated with an OR operator. If this parameter is not specified, the default value is empty, which indicates that logs from all containers are collected. Regular expression matching is supported. The key in the map is the container label name, and the value is the container label value. Details:
  • If the value in the map is empty, all containers that contain the label specified by the key are matched.

  • If the value in the map is not empty:
    • If the value starts with ^ and ends with $, a container is matched if it contains the label specified by the key and the label value matches the regular expression specified by the value.

    • In other cases, a container is matched if it contains the label specified by the key and the label value is exactly the value.

ContainerFilters.ExcludeContainerLabelmapNoEmpty/Specifies the label conditions to exclude containers from log collection. Multiple conditions are evaluated with an OR operator. If this parameter is not specified, the default value is empty, which indicates that logs from all containers are collected. Regular expression matching is supported. The key in the map is the container label name, and the value is the container label value. Details:
  • If the value in the map is empty, all containers that contain the label specified by the key are matched.

  • If the value in the map is not empty:
    • If the value starts with ^ and ends with $, a container is matched if it contains the label specified by the key and the label value matches the regular expression specified by the value.

    • In other cases, a container is matched if it contains the label specified by the key and the label value is exactly the value.

ExternalK8sLabelTagmapNoEmpty/For containers deployed in a Kubernetes environment, specifies the additional tags related to pod labels to be added to logs. The key in the map is the pod label name, and the value is the corresponding tag name. For example, if you add app: k8s\_label\_app to the map and a pod contains the app=serviceA label, this information is added to the log as a tag, specifically the __tag__:k8s_label_app: serviceA field. If the pod does not contain the app label, an empty __tag__:k8s_label_app: field is added.
ExternalEnvTagmapNoEmpty/For containers deployed in a Kubernetes environment, specifies the additional tags related to container environment variables to be added to logs. The key in the map is the environment variable name, and the value is the corresponding tag name. For example, if you add VERSION: env\_version to the map and a container contains the VERSION=v1.0.0 environment variable, this information is added to the log as a tag, specifically the __tag__:env_version: v1.0.0 field. If the container does not contain the VERSION environment variable, an empty __tag__:env_version: field is added.
CollectingContainersMetaboolNofalsetrueSpecifies whether to enable the preview of container metadata.
AppendingLogPositionMetaboolNofalsefalseSpecifies whether to add the metadata of the file to which a log entry belongs to the log entry, including the __tag__:__inode__ field and the __file_offset__ field.
AllowingIncludedByMultiConfigsboolNofalsefalseSpecifies whether to allow the current configuration to collect logs from files that are already matched by other configurations.
TagsobjectNoEmpty{"FileInodeTagKey":"__inode__"}
Important Supported only in LoongCollector 3.0.10 and later.
Controls the tags related to file collection. The key is the tag parameter name, and the value is the field name of the tag in the log. If the value is default, the default value is used. If the value is an empty string, the tag is deleted. You can configure the following tags:
  • FileInodeTagKey: the inode of the file. By default, this tag is not added. The default value is "__inode__".

  • FilePathTagKey: the path of the file. By default, this tag is added. The default value is "__path__".

The following parameters are valid only when the EnableContainerDiscovery parameter is set to true.
  • K8sNamespaceTagKey: the namespace of the container where the file resides. By default, this tag is added. The default value is "_namespace_".

  • K8sPodNameTagKey: the name of the pod where the file resides. By default, this tag is added. The default value is "_pod_name_".

  • K8sPodUidTagKey: the UID of the pod where the file resides. By default, this tag is added. The default value is "_pod_uid_".

  • ContainerNameTagKey: the name of the container where the file resides. By default, this tag is added. The default value is "_container_name_".

  • ContainerIpTagKey: the IP address of the container where the file resides. By default, this tag is added. The default value is "_container_ip_".

  • ContainerImageNameTagKey: the image of the container where the file resides. By default, this tag is added. The default value is "_image_name_".

FileOffsetKeystringNoEmpty__file_offset__
Important Supported only in LoongCollector 3.0.10 and later.
The tag for the position of the log in the file. By default, this tag is not added. The default value is __file_offset__. If the value is __default__, the default value is used. If the value is an empty string, the tag is deleted. If the EnableLogPositionMeta parameter and the Tags.FileInodeTagKey or FileOffsetKey parameter exist at the same time, the EnableLogPositionMeta parameter is ignored.

Container standard output (legacy)

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/service_docker_stdoutThe type of the plug-in. Set the value to service_docker_stdout.
StdoutBooleanNotruetrueSpecifies whether to collect standard output (stdout).
StderrBooleanNotruetrueSpecifies whether to collect standard error (stderr).
StartLogMaxOffsetIntegerNo128×1024131072The length of historical data to trace back during the first collection. Unit: bytes. Recommended values: 131072 to 1048576.
IncludeLabelMap, where LabelKey and LabelValue are of the String typeNoEmpty

The whitelist of container labels, which is used to specify the containers from which logs are collected. The default value is empty, which indicates that the standard output of all containers is collected. If you want to configure a whitelist of container labels, LabelKey is required and LabelValue is optional.

  • If LabelValue is empty, all containers whose labels contain LabelKey are matched.

  • If LabelValue is not empty, only containers whose labels contain LabelKey=LabelValue are matched.

    By default, LabelValue uses string matching, which means a match occurs only when LabelValue is exactly the same as the container label value. If the value starts with ^ and ends with $, regular expression matching is used. For example, if LabelKey is set to io.kubernetes.container.name and LabelValue is set to ^(nginx|cube)$, containers named nginx or cube are matched.

Multiple whitelists are evaluated with an OR operator. A container is matched as long as its labels meet any of the whitelists.

ExcludeLabelMap, where LabelKey and LabelValue are of the String typeNoEmpty

The blacklist of container labels, which is used to exclude containers from log collection. The default value is empty, which indicates that no containers are excluded. If you want to configure a blacklist of container labels, LabelKey is required and LabelValue is optional.

  • If LabelValue is empty, all containers whose labels contain LabelKey are excluded.

  • If LabelValue is not empty, only containers whose labels contain LabelKey=LabelValue are excluded.

    By default, LabelValue uses string matching, which means a match occurs only when LabelValue is exactly the same as the container label value. If the value starts with ^ and ends with $, regular expression matching is used. For example, if LabelKey is set to io.kubernetes.container.name and LabelValue is set to ^(nginx|cube)$, containers named nginx or cube are matched.

Multiple blacklists are evaluated with an OR operator. A container is excluded as long as its labels meet any of the blacklists.

IncludeEnvMap, where EnvKey and EnvValue are of the String typeNoEmpty

The whitelist of environment variables, which is used to specify the containers from which logs are collected. The default value is empty, which indicates that the standard output of all containers is collected. If you want to configure a whitelist of environment variables, EnvKey is required and EnvValue is optional.

  • If EnvValue is empty, all containers whose environment variables contain EnvKey are matched.

  • If EnvValue is not empty, only containers whose environment variables contain EnvKey=EnvValue are matched.

    By default, EnvValue uses string matching, which means a match occurs only when EnvValue is exactly the same as the environment variable value. If the value starts with ^ and ends with $, regular expression matching is used. For example, if EnvKey is set to NGINX_SERVICE_PORT and EnvValue is set to `^(80

ExcludeEnvMap, where EnvKey and EnvValue are of the String typeNoEmpty

The blacklist of environment variables, which is used to exclude containers from log collection. The default value is empty, which indicates that no containers are excluded. If you want to configure a blacklist of environment variables, EnvKey is required and EnvValue is optional.

  • If EnvValue is empty, logs from all containers whose environment variables contain EnvKey are excluded.

  • If EnvValue is not empty, only containers whose environment variables contain EnvKey=EnvValue are excluded.

    By default, EnvValue uses string matching, which means a match occurs only when EnvValue is exactly the same as the environment variable value. If the value starts with ^ and ends with $, regular expression matching is used. For example, if EnvKey is set to NGINX_SERVICE_PORT and EnvValue is set to ^(80|6379)$, containers whose service ports are 80 or 6379 are matched.

Multiple blacklists are evaluated with an OR operator. A container is excluded as long as its environment variables meet any of the key-value pairs.

IncludeK8sLabelMap, where LabelKey and LabelValue are of the String typeNoEmpty

The whitelist of Kubernetes labels (defined in template.metadata), which is used to specify the containers from which logs are collected. If you want to configure a whitelist of Kubernetes labels, LabelKey is required and LabelValue is optional.

  • If LabelValue is empty, all containers whose Kubernetes labels contain LabelKey are matched.

  • If LabelValue is not empty, only containers whose Kubernetes labels contain LabelKey=LabelValue are matched.

    By default, LabelValue uses string matching, which means a match occurs only when LabelValue is exactly the same as the Kubernetes label value. If the value starts with ^ and ends with $, regular expression matching is used. For example, if LabelKey is set to app and LabelValue is set to ^(test1|test2)$, containers whose Kubernetes labels contain app:test1 or app:test2 are matched.

Multiple whitelists are evaluated with an OR operator. A container is matched as long as its Kubernetes labels meet any of the whitelists.

ExcludeK8sLabelMap, where LabelKey and LabelValue are of the String typeNoEmpty

The blacklist of Kubernetes labels (defined in template.metadata), which is used to exclude containers from log collection. If you want to configure a blacklist of Kubernetes labels, LabelKey is required and LabelValue is optional.

  • If LabelValue is empty, all containers whose Kubernetes labels contain LabelKey are excluded.

  • If LabelValue is not empty, only containers whose Kubernetes labels contain LabelKey=LabelValue are excluded.

    By default, LabelValue uses string matching, which means a match occurs only when LabelValue is exactly the same as the Kubernetes label value. If the value starts with ^ and ends with $, regular expression matching is used. For example, if LabelKey is set to app and LabelValue is set to ^(test1|test2)$, containers whose Kubernetes labels contain app:test1 or app:test2 are matched.

Multiple blacklists are evaluated with an OR operator. A container is excluded as long as its Kubernetes labels meet any of the blacklists.

K8sNamespaceRegexStringNoEmpty^(default|nginx)$Specifies the namespaces of the containers from which logs are collected. Regular expression matching is supported. For example, if you set the value to ^(default|nginx)$, all containers in the nginx and default namespaces are matched.
K8sPodRegexStringNoEmpty^(nginx-log-demo.*)$Specifies the names of the pods where the containers from which logs are collected reside. Regular expression matching is supported. For example, if you set the value to ^(nginx-log-demo.*)$, all containers in pods whose names start with nginx-log-demo are matched.
K8sContainerRegexStringNoEmpty^(container-test)$Specifies the names of the containers from which logs are collected. Kubernetes container names are defined in spec.containers. Regular expression matching is supported. For example, if you set the value to ^(container-test)$, all containers named container-test are matched.

Data processing parameters

ParameterTypeRequiredDefault valueExampleDescription
BeginLineRegexStringNoEmpty

The regular expression used to match the first line of a log entry.

If this parameter is empty, the single-line mode is used.

If the expression matches the beginning of a line, the line is treated as a new log entry. Otherwise, the line is appended to the previous log entry.

BeginLineCheckLengthIntegerNoEmpty

The length of data checked for first-line matching. Unit: bytes.

Default value: 10 × 1024.

If the regular expression for first-line matching can be evaluated within the first N bytes, set this parameter to improve matching efficiency.

BeginLineTimeoutMsIntegerNoEmpty

The timeout period for first-line matching. Unit: milliseconds.

Default value: 3000.

If no new logs appear within 3,000 milliseconds, the matching ends and the last log entry is uploaded to Simple Log Service.

MaxLogSizeIntegerNoEmpty

The maximum length of a log entry. Unit: bytes.

Default value: 512 × 1024.

If the length of a log entry exceeds this value, the system stops searching for the first line and directly uploads the log entry.

ExternalK8sLabelTagMap, where LabelKey and LabelValue are of the String typeNoEmpty

After you configure Kubernetes labels (defined in template.metadata) as log tags, iLogtail adds Kubernetes label-related fields to logs.

For example, if you set LabelKey to app and LabelValue to k8s_label_app, and a pod contains the app=serviceA label, iLogtail adds this information to the log, specifically the k8s_label_app: serviceA field. If the pod does not contain the app label, an empty k8s_label_app: field is added.

ExternalEnvTagMap, where EnvKey and EnvValue are of the String typeNoEmpty

After you configure container environment variables as log tags, iLogtail adds container environment variable-related fields to logs.

For example, if you set EnvKey to VERSION and EnvValue to env_version, and a container contains the VERSION=v1.0.0 environment variable, this information is added to the log as a tag, specifically the env_version: v1.0.0 field. If the container does not contain the VERSION environment variable, an empty env_version: field is added.

Data processing environment variables

Environment variableTypeRequiredDefault valueExampleDescription
ALIYUN_LOG_ENV_TAGSStringNoEmpty

After you configure global environment variables as log tags, iLogtail adds environment variable-related fields of the container where iLogtail resides to logs. Separate multiple environment variable names with |.

For example, if you set the value to node_name|node_ip, and the relevant environment variables are exposed in the iLogtail container, this information is added to the log as tags, specifically the node_ip:172.16.0.1 and node_name:worknode fields.

Container standard output (new version)

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/input_container_stdioThe type of the plug-in. Set the value to input_container_stdio.
IgnoringStdoutBooleanNofalsefalseSpecifies whether to ignore standard output (stdout). A value of false indicates that stdout is collected. A value of true indicates that stdout is not collected.
IgnoringStderrBooleanNofalsefalseSpecifies whether to ignore standard error (stderr). A value of false indicates that stderr is collected. A value of true indicates that stderr is not collected.
TailSizeKBInteger (uint)No10242048The distance from the end of the file to the starting collection position when the configuration takes effect for the first time. Unit: KB. If the file size is smaller than this value, collection starts from the beginning of the file. Valid values: 0 to 104857600.
AllowingIncludedByMultiConfigsBooleanNofalsetrueSpecifies whether to allow the current configuration to collect standard output logs from containers that are already matched by other configurations. The default value false indicates that duplicate collection by multiple configurations is avoided.
ContainerFiltersObjectNoEmptySee the ContainerFilters table belowThe container filtering options. Multiple options are evaluated with an AND operator.
ExternalK8sLabelTagMap, where LabelKey and LabelValue are of the String typeNoEmpty{"app":"k8s_label_app"}For Kubernetes scenarios: retrieves values from pod labels and appends them as fields (tags) to logs. The key in the map is the pod label name, and the value is the log field name (tag name). If the pod does not have the label, an empty field is appended.
ExternalEnvTagMap, where EnvKey and EnvValue are of the String typeNoEmpty{"VERSION":"env_version"}For container scenarios: retrieves values from container environment variables and appends them as fields (tags) to logs. The key in the map is the environment variable name, and the value is the log field name (tag name). If the container does not have the environment variable, an empty field is appended.
MultilineObjectNoEmptySee the Multiline table belowThe multiline aggregation options.

Container filter options (ContainerFilters)

ParameterTypeRequiredDefault valueExampleDescription
IncludeK8sLabelMap, where LabelKey and LabelValue are stringsNoEmpty{"app":"^(test1|test2)$"}

The whitelist of Kubernetes labels (defined in the metadata.labels of a pod) used to specify the containers from which logs are collected. Default value: empty, which indicates that the standard output of all containers is collected.

  • If LabelValue is empty, all containers whose Kubernetes labels contain LabelKey are matched.

  • If LabelValue is not empty, only containers whose Kubernetes labels contain LabelKey=LabelValue are matched.

    By default, LabelValue uses exact string matching, which means a match occurs only when LabelValue is exactly the same as the value of the Kubernetes label. If the value starts with ^ and ends with $, regular expression matching is used.

Multiple whitelists are evaluated by using the OR operator. A container is matched if its Kubernetes labels meet any of the whitelists.

ExcludeK8sLabelMap, where LabelKey and LabelValue are stringsNoEmpty{"env":"^(test.*)$"}

The blacklist of Kubernetes labels (defined in the metadata.labels of a pod) used to exclude the containers from which logs are not collected. Default value: empty, which indicates that no containers are excluded.

  • If LabelValue is empty, all containers whose Kubernetes labels contain LabelKey are excluded.

  • If LabelValue is not empty, only containers whose Kubernetes labels contain LabelKey=LabelValue are excluded.

    By default, LabelValue uses exact string matching, which means a match occurs only when LabelValue is exactly the same as the value of the Kubernetes label. If the value starts with ^ and ends with $, regular expression matching is used.

Multiple blacklists are evaluated by using the OR operator. A container is excluded if its Kubernetes labels meet any of the blacklists.

IncludeEnvMap, where EnvKey and EnvValue are stringsNoEmpty{"NGINX_SERVICE_PORT":"^(80|6379)$"}

The whitelist of environment variables used to specify the containers from which logs are collected. Default value: empty, which indicates that the standard output of all containers is collected. If you want to configure an environment variable whitelist, EnvKey is required and EnvValue is optional.

  • If EnvValue is empty, all containers whose environment variables contain EnvKey are matched.

  • If EnvValue is not empty, only containers whose environment variables contain EnvKey=EnvValue are matched.

    By default, EnvValue uses exact string matching, which means a match occurs only when EnvValue is exactly the same as the value of the environment variable. If the value starts with ^ and ends with $, regular expression matching is used.

Multiple whitelists are evaluated by using the OR operator. A container is matched if its environment variables meet any of the key-value pairs.

ExcludeEnvMap, where EnvKey and EnvValue are stringsNoEmpty{"POD_NAMESPACE":"kube-system"}

The blacklist of environment variables used to exclude the containers from which logs are not collected. Default value: empty, which indicates that no containers are excluded. If you want to configure an environment variable blacklist, EnvKey is required and EnvValue is optional.

  • If EnvValue is empty, all containers whose environment variables contain EnvKey are excluded.

  • If EnvValue is not empty, only containers whose environment variables contain EnvKey=EnvValue are excluded.

    By default, EnvValue uses exact string matching, which means a match occurs only when EnvValue is exactly the same as the value of the environment variable. If the value starts with ^ and ends with $, regular expression matching is used.

Multiple blacklists are evaluated by using the OR operator. A container is excluded if its environment variables meet any of the key-value pairs.

IncludeContainerLabelMap, where LabelKey and LabelValue are stringsNoEmpty{"io.kubernetes.container.name":"nginx"}

The whitelist of container labels used to specify the containers from which logs are collected. Default value: empty, which indicates that the standard output of all containers is collected. If you want to configure a container label whitelist, LabelKey is required and LabelValue is optional.

  • If LabelValue is empty, all containers whose container labels contain LabelKey are matched.

  • If LabelValue is not empty, only containers whose container labels contain LabelKey=LabelValue are matched.

    By default, LabelValue uses exact string matching, which means a match occurs only when LabelValue is exactly the same as the value of the container label. If the value starts with ^ and ends with $, regular expression matching is used.

Multiple whitelists are evaluated by using the OR operator. A container is matched if its container labels meet any of the whitelists.

ExcludeContainerLabelMap, where LabelKey and LabelValue are stringsNoEmpty{"io.kubernetes.pod.namespace":"kube-system"}

The blacklist of container labels used to exclude the containers from which logs are not collected. Default value: empty, which indicates that no containers are excluded. If you want to configure a container label blacklist, LabelKey is required and LabelValue is optional.

  • If LabelValue is empty, all containers whose container labels contain LabelKey are excluded.

  • If LabelValue is not empty, only containers whose container labels contain LabelKey=LabelValue are excluded.

    By default, LabelValue uses exact string matching, which means a match occurs only when LabelValue is exactly the same as the value of the container label. If the value starts with ^ and ends with $, regular expression matching is used.

Multiple blacklists are evaluated by using the OR operator. A container is excluded if its container labels meet any of the blacklists.

Multiline aggregation options (Multiline)

ParameterTypeRequiredDefault valueExampleDescription
ModeStringNocustomcustomThe multiline aggregation mode. Valid values: custom and JSON. If you set the value to JSON, logs are read and concatenated in JSON format.
StartPatternStringNo (required in custom mode)Empty\d+-\d+-\d+.*The regular expression used to match the first line of a log entry. A matched line is considered the start of a new log entry.
UnmatchedContentTreatmentStringNosingle_linediscardThe processing method for unmatched log segments. Valid values: discard (discards the unmatched log segments) and single_line (outputs the unmatched log segments line by line as single-line logs).

MySQL input plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/service_mysqlThe type of the plugin. Set the value to service_mysql.
AddressstringNo127.0.0.1:3306rm-*.mysql.rds.aliyuncs.comThe endpoint of the MySQL database.
UserstringNorootrootThe username used to log on to the MySQL database.
PasswordstringNoEmptyThe password used to log on to the MySQL database. If you have high security requirements, we recommend that you set the username and password to xxx. After the collection configuration is synchronized to the local machine, find the corresponding configuration in the local file /usr/local/ilogtail/user_log_config.json and modify it. For more information, see Modify local configurations.
Important If you modify this parameter in the console, the local configuration will be overwritten after synchronization.
DataBasestringNo/project_databaseThe name of the database.
DialTimeOutMsintNo50005000The timeout period for connecting to the MySQL database. Unit: milliseconds.
ReadTimeOutMsintNo50005000The timeout period for reading MySQL query results. Unit: milliseconds.
StateMentstringNo/The SELECT statement. If CheckPoint is set to true, the WHERE clause of the SELECT statement in StateMent must contain the checkpoint column (CheckPointColumn). You can use a question mark (?) as a placeholder in conjunction with the checkpoint column. For example, if CheckPointColumn is set to id, CheckPointStart is set to 0, and StateMent is set to SELECT * from ... where id > ?, the system saves the ID of the last data record as the checkpoint after each collection. During the next collection, the question mark (?) in the query statement is replaced with the ID corresponding to the checkpoint.
LimitboolNofalsetrueSpecifies whether to use LIMIT for pagination.
  • true: uses LIMIT for pagination.

  • false (default): does not use LIMIT for pagination.

We recommend that you use LIMIT for pagination. If Limit is set to true, the system automatically appends a LIMIT clause to the SELECT statement during SQL queries.
PageSizeintNo/10The page size. This parameter is required when Limit is set to true.
MaxSyncSizeintNo00The maximum number of records to synchronize at a time. Default value: 0, which indicates no limit.
CheckPointboolNofalsetrueSpecifies whether to use a checkpoint.
  • true: uses a checkpoint.

  • false (default): does not use a checkpoint.

A checkpoint can be used as the starting point for the next data collection to implement incremental data collection.
CheckPointColumnstringNoEmpty1The name of the checkpoint column. This parameter is required when CheckPoint is set to true. Warning The values in this column must be incremental. Otherwise, data may be missed during collection. The maximum value in each query result is used as the input for the next query.
CheckPointColumnTypestringNoEmptyintThe data type of the checkpoint column. Valid values: int and time. The int type is stored internally as int64. The time type supports the date, datetime, and time types in MySQL. This parameter is required when CheckPoint is set to true.
CheckPointStartstringNoEmptyThe initial value of the checkpoint column. This parameter is required when CheckPoint is set to true.
CheckPointSavePerPageboolNotruetrueSpecifies whether to save a checkpoint each time a page is turned.
  • true (default): saves a checkpoint each time a page is turned.

  • false: saves a checkpoint after each synchronization is completed.

IntervalMsintNo6000060000The synchronization interval. Default value: 60000. Unit: milliseconds.

HTTP input plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/metric_httpThe type of the plugin. Set the value to metric_http.
AddressstringYes/The list of URLs. Important The URLs must start with http or https.
IntervalMsintYes/10The interval between requests. Unit: milliseconds.
MethodstringNoGETGETThe HTTP request method. The value must be in uppercase.
BodystringNoEmptyThe content of the HTTP body field.
HeadersmapNoEmpty{"key":"value"}The content of the HTTP header, such as {"key":"value"}. Replace the value with the actual value.
PerAddressSleepMsintNo100100The interval between requests for each URL in the Addresses list. Unit: milliseconds.
ResponseTimeoutMsintNo50005000The request timeout period. Unit: milliseconds.
IncludeBodyboolNofalsetrueSpecifies whether to collect the request body. Default value: false. If the value is set to true, the content of the request body is stored in the key named content.
FollowRedirectsboolNofalsefalseSpecifies whether to automatically handle redirects.
InsecureSkipVerifyboolNofalsefalseSpecifies whether to skip HTTPS security checks.
ResponseStringMatchstringNo/The regular expression used to check the returned body content. The check result is stored in the key named response_match. If the content matches the regular expression, the value is yes. If the content does not match the regular expression, the value is no.

Syslog input plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/service_syslogThe type of the plugin. Set the value to service_syslog.
AddressstringNotcp://127.0.0.1:9999The protocol, IP address, and port that Logtail listens on. Logtail listens and obtains log data based on the Logtail configuration. Format: [tcp/udp]://[ ip ]:[ port ]. If this parameter is not configured, the default value tcp://127.0.0.1:9999 is used, which indicates that only locally forwarded logs can be received. Note
  • The listening protocol, IP address, and port number configured in the Logtail configuration must be the same as the forwarding rules configured in the rsyslog configuration file.

  • If the server on which Logtail is installed has multiple IP addresses that can receive logs, you can set the IP address to 0.0.0.0 to listen on all IP addresses of the server.

ParseProtocolstringNoEmptyrfc3164The protocol used to parse logs. Default value: empty, which indicates that logs are not parsed. Valid values:
  • Empty: does not parse logs.

  • rfc3164: uses the RFC3164 protocol to parse logs.

  • rfc5424: uses the RFC5424 protocol to parse logs.

  • auto: allows Logtail to automatically select an appropriate parsing protocol based on the log content.

IgnoreParseFailureboolNotruetrueThe action to take after a parsing failure. If this parameter is not configured, the default value true is used, which indicates that parsing is abandoned and the returned content field is directly populated. If the value is set to false, logs are discarded when parsing fails.

Systemd Journal input plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/service_journalThe type of the plugin. Set the value to service_journal.
JournalPaths[string]YesEmpty/var/log/journalThe path to Journal logs. We recommend that you set this parameter to the directory where Journal logs are stored.
SeekPositionstringNotailtailThe collection mode for the first time. Valid values:
  • head: collects all data.

  • tail: collects only new data generated after the Logtail collection configuration is applied.

KernelboolNotruetrueSpecifies whether to collect kernel logs.
Units[string]NoEmpty""The list of units to collect. Default value: empty, which indicates that all units are collected.
ParseSyslogFacilityboolNofalsefalseSpecifies whether to parse the facility field of syslog logs. If this parameter is not configured, the field is not parsed.
ParsePriorityboolNofalsefalseSpecifies whether to parse the Priority field. If this parameter is not configured, the field is not parsed. If the value is set to true, the mapping of the Priority field is as follows: plaintext "0": "emergency" "1": "alert" "2": "critical" "3": "error" "4": "warning" "5": "notice" "6": "informational" "7": "debug"
UseJournalEventTimeboolNofalsefalseSpecifies whether to use the fields in Journal logs as the log time. If this parameter is not configured, the collection time is used as the log time. The delay for real-time log collection is generally within 3 seconds.

SQL Server input plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/service_mssqlThe type of the plug-in. Set the value to service_mssql.
AddressstringNo127.0.0.1:1433rm-*.sqlserver.rds.aliyuncs.comThe address of the SQL Server database.
UserstringNorootrootThe username used to log on to the SQL Server database.
PasswordstringNoEmptyThe password used to log on to the SQL Server database. If you have high security requirements, set the username and password to xxx. After the collection configuration is synchronized to the local machine, find the corresponding configuration in the local file /usr/local/ilogtail/user_log_config.json and modify it. For more information, see Modify local configurations.
Important If you modify this parameter in the console, the local configuration is overwritten after synchronization.
DataBasestringNo/project_databaseThe name of the database.
DialTimeOutMsintNo50005000The timeout period for connecting to the SQL Server database. Unit: milliseconds.
ReadTimeOutMsintNo50005000The timeout period for reading SQL Server query results. Unit: milliseconds.
StateMentstringNo/The SELECT statement. If you set CheckPoint to true, the WHERE clause of the SELECT statement in StateMent must include the checkpoint column (CheckPointColumn). You can use a question mark (?) as a placeholder in combination with the checkpoint column. For example, if you set CheckPointColumn to id, CheckPointStart to 0, and StateMent to SELECT * from ... where id > ?, the system saves the ID of the last data record as the checkpoint after each collection. During the next collection, the question mark (?) in the query statement is replaced with the ID corresponding to the checkpoint.
LimitboolNofalsetrueSpecifies whether to use LIMIT for pagination. Valid values:
  • true: uses LIMIT for pagination.

  • false (default): does not use LIMIT for pagination.

We recommend that you use LIMIT for pagination. If you set Limit to true, the system automatically appends a LIMIT clause to the SELECT statement during SQL queries.
PageSizeintNo/10The page size. This parameter is required if Limit is set to true.
MaxSyncSizeintNo00The maximum number of records to synchronize at a time. Default value: 0, which indicates no limit.
CheckPointboolNofalsetrueSpecifies whether to use a checkpoint. Valid values:
  • true: uses a checkpoint.

  • false (default): does not use a checkpoint.

A checkpoint can be used as the starting point for the next data collection to implement incremental data collection.
CheckPointColumnstringNoEmpty1The name of the checkpoint column. This parameter is required if CheckPoint is set to true. Warning The values in this column must be incremental. Otherwise, data loss may occur during collection. The maximum value in each query result is used as the input for the next query.
CheckPointColumnTypestringNoEmptyintThe data type of the checkpoint column. Valid values: int and time. The int type is internally stored as int64. The time type supports the date, datetime, and time types of SQL Server. This parameter is required if CheckPoint is set to true.
CheckPointStartstringNoEmptyThe initial value of the checkpoint column. This parameter is required if CheckPoint is set to true.
CheckPointSavePerPageboolNotruetrueSpecifies whether to save the checkpoint upon each pagination. Valid values:
  • true (default): saves the checkpoint upon each pagination.

  • false: saves the checkpoint after each synchronization is completed.

IntervalMsintNo6000060000The synchronization interval. Default value: 60000. Unit: milliseconds.

PostgreSQL input plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/service_pgsqlThe type of the plug-in. Set the value to service_pgsql.
AddressstringNo127.0.0.1:5432rm-*.pg.rds.aliyuncs.comThe address of the PostgreSQL database.
UserstringNorootrootThe username used to log on to the PostgreSQL database.
PasswordstringNoEmptyThe password used to log on to the PostgreSQL database. If you have high security requirements, set the username and password to xxx. After the collection configuration is synchronized to the local machine, find the corresponding configuration in the local file /usr/local/ilogtail/user_log_config.json and modify it. For more information, see Modify local configurations.
Important If you modify this parameter in the console, the local configuration is overwritten after synchronization.
DataBasestringNo/project_databaseThe name of the PostgreSQL database.
DialTimeOutMsintNo50005000The timeout period for connecting to the PostgreSQL database. Unit: milliseconds.
ReadTimeOutMsintNo50005000The timeout period for reading PostgreSQL query results. Unit: milliseconds.
StateMentstringNo/The SELECT statement. If you set CheckPoint to true, the WHERE clause of the SELECT statement in StateMent must include the checkpoint column (CheckPointColumn parameter), and the value of this column must be set to $1. For example, if you set CheckPointColumn to id and StateMent to SELECT * from ... where id > $1.
LimitboolNofalsetrueSpecifies whether to use LIMIT for pagination. Valid values:
  • true: uses LIMIT for pagination.

  • false (default): does not use LIMIT for pagination.

We recommend that you use LIMIT for pagination. If you set Limit to true, the system automatically appends a LIMIT clause to the SELECT statement during SQL queries.
PageSizeintNo/10The page size. This parameter is required if Limit is set to true.
MaxSyncSizeintNo00The maximum number of records to synchronize at a time. Default value: 0, which indicates no limit.
CheckPointboolNofalsetrueSpecifies whether to use a checkpoint. Valid values:
  • true: uses a checkpoint.

  • false (default): does not use a checkpoint.

A checkpoint can be used as the starting point for the next data collection to implement incremental data collection.
CheckPointColumnstringNoEmpty1The name of the checkpoint column. This parameter is required if CheckPoint is set to true. Warning The values in this column must be incremental. Otherwise, data loss may occur during collection. The maximum value in each query result is used as the input for the next query.
CheckPointColumnTypestringNoEmptyintThe data type of the checkpoint column. Valid values: int and time. The int type is internally stored as int64. The time type supports the time types of PostgreSQL. This parameter is required if CheckPoint is set to true.
CheckPointStartstringNoEmptyThe initial value of the checkpoint column. This parameter is required if CheckPoint is set to true.
CheckPointSavePerPageboolNotruetrueSpecifies whether to save the checkpoint upon each pagination. Valid values:
  • true (default): saves the checkpoint upon each pagination.

  • false: saves the checkpoint after each synchronization is completed.

IntervalMsintNo6000060000The synchronization interval. Default value: 60000. Unit: milliseconds.

SNMP protocol input plugin

ParameterTypeRequiredDefault valueExampleDescription
Targets[string]Yes/127.0.0.1The IP addresses of the target machine group.
PortstringNo161161The port used by the SNMP protocol.
CommunitystringNopublicpublicThe community name. SNMPv1 and SNMPv2 use the community name for authentication.
UserNamestringNoEmptyrootThe username. SNMPv3 supports authentication by using a username.
AuthenticationProtocolstringNoNoAuthNoAuthThe authentication protocol. SNMPv3 supports authentication by using an authentication protocol.
AuthenticationPassphrasestringNoEmptyThe authentication password. Default value: empty. If you set AuthenticationProtocol to MD5 or SHA, you must set AuthenticationPassphrase.
PrivacyProtocolstringNoNoPrivNoPrivThe privacy protocol. SNMPv3 supports authentication by using a privacy protocol.
PrivacyPassphrasestringNoEmptyThe privacy protocol password. The default value is the same as the authentication password. If you set PrivacyProtocol to DES or AES, you must set PrivacyPassphrase.
TimeoutintNo55The timeout period for a single query operation. Unit: seconds.
VersionintNo22The SNMP protocol version. Valid values: 1, 2, and 3.
TransportstringNoudpudpThe SNMP communication method. Valid values: udp and tcp.
MaxRepetitionsintNo00The number of retries after a query times out.
Oids[string]NoEmpty1The object identifiers (OIDs) to query on the target machine.
Fields[string]NoEmptyintThe fields to query on the target machine. This plug-in first translates the fields by looking up the local Management Information Base (MIB), translates them into OIDs, and then queries them together.
Tables[string]NoEmptyThe tables to query on the target machine. This plug-in first queries all fields in the tables, looks up the local MIB, translates them into OIDs, and then queries them together.

Script output collection plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/input_commandThe plugin type. Set the value to input_command.
ScriptTypestringYesEmptyshellThe type of the script content. Valid values: bash, shell, python2, and python3.
UserstringYes/publicThe username used to run the command. Only non-root users are supported. Note * Make sure that the specified username exists on the machine. Configure the minimum permissions and grant only the read, write, and execute (rwx) permissions on the required directories or files.
ScriptContentstringYesEmptyThe script content. Plain text and Base64-encoded content are supported. The maximum length is 512 × 1024 bytes.
ContentEncodingstringNoPlainTextPlainTextThe text format of the script content. Valid values:
  • PlainText (default): plain text without encoding.

  • Base64: Base64-encoded text.

LineSplitSepstringNoEmptyThe delimiter used to split the script output. If this parameter is left empty, the output is not split and is returned as a single piece of data.
CmdPathstringNoEmpty/usr/bin/bashThe path used to execute the script command. If this parameter is left empty, the default path is used. Default paths:
  • bash: /usr/bin/bash

  • shell: /usr/bin/sh

  • python2: /usr/bin/python2

  • python3: /usr/bin/python3

TimeoutMilliSecondsintNo30003000The timeout period for executing the script. Unit: milliseconds.
IgnoreErrorboolNofalsefalseSpecifies whether to ignore error logs when the plugin execution fails. Default value: false, which indicates that error logs are not ignored.
Environments[string]NoThe environment variables. The default value is the value of os.Environ(). If Environments is specified, the specified environment variables are appended to the value of os.Environ().
IntervalMsintNo50005000The collection trigger frequency or script execution frequency. Unit: milliseconds.

Native processing plugins.

Regex parsing native processing plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_parse_regex_nativeThe plugin type. Set the value to processor_parse_regex_native.
SourceKeystringYes/contentThe name of the source field.
RegexstringYes/(\d+-\d+-\d+)\s+(.*)The regular expression.
Keys[string]Yes/["time", "msg"]The list of extracted fields.
KeepingSourceWhenParseFailboolNofalsefalseSpecifies whether to retain the source field when parsing fails.
KeepingSourceWhenParseSucceedboolNofalsefalseSpecifies whether to retain the source field when parsing succeeds.
RenamedSourceKeystringNoEmptykeyThe name of the field used to store the source field when the source field is retained. If this parameter is left empty, the source field is not renamed by default.

JSON parsing native processing plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_parse_json_nativeThe plugin type. Set the value to processor_parse_json_native.
SourceKeystringYes/contentThe name of the source field.
KeepingSourceWhenParseFailboolNofalsefalseSpecifies whether to retain the source field when parsing fails.
KeepingSourceWhenParseSucceedboolNofalsefalseSpecifies whether to retain the source field when parsing succeeds.
RenamedSourceKeystringNoEmptykeyThe name of the field used to store the source field when the source field is retained. If this parameter is left empty, the source field is not renamed by default.

Delimiter parsing native processing plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_parse_delimiter_nativeThe plugin type. Set the value to processor_parse_delimiter_native.
SourceKeystringYes/contentThe name of the source field.
SeparatorstringYes/,The delimiter.
QuotestringNo""The quote character.
Keys[string]Yes/["time", "msg"]The list of extracted fields.
AllowingShortenedFieldsboolNotruetrueSpecifies whether to allow the number of extracted fields to be less than the number of fields specified in Keys. If this parameter is set to false, this scenario is considered a parsing failure.
OverflowedFieldsTreatmentstringNoextendextendThe action to take when the number of extracted fields is greater than the number of fields specified in Keys. Valid values:
  • extend: retains the extra fields and adds each extra field to the log as a separate field. The field name of an extra field is __column$i__, where $i represents the sequence number of the extra field, starting from 0.

  • keep: retains the extra fields but adds the extra content to the log as a single field named __column0__.

  • discard: discards the extra fields.

KeepingSourceWhenParseFailboolNofalsefalseSpecifies whether to retain the source field when parsing fails.
KeepingSourceWhenParseSucceedboolNofalsefalseSpecifies whether to retain the source field when parsing succeeds.
RenamedSourceKeystringNoEmptykeyThe name of the field used to store the source field when the source field is retained. If this parameter is left empty, the source field is not renamed by default.

Apsara parsing native processing plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_parse_apsara_nativeThe plugin type. Set the value to processor_parse_apsara_native.
SourceKeystringYes/contentThe name of the source field.
TimezonestringNoEmptyGMT+08:00The time zone of the log time. The format is GMT+HH:MM (east zone) or GMT-HH:MM (west zone).
KeepingSourceWhenParseFailboolNofalsefalseSpecifies whether to retain the source field when parsing fails.
KeepingSourceWhenParseSucceedboolNofalsefalseSpecifies whether to retain the source field when parsing succeeds.
RenamedSourceKeystringNoEmptykeyThe name of the field used to store the source field when the source field is retained. If this parameter is left empty, the source field is not renamed by default.

Time parsing native processing plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_parse_timestamp_nativeThe plugin type. Set the value to processor_parse_timestamp_native.
SourceKeystringYes/contentThe name of the source field.
SourceFormatstringYes/%Y/%m/%d %H:%M:%SThe log time format. For more information, see Time formats.
SourceTimezonestringNoEmptyGMT+08:00The time zone of the log time. The format is GMT+HH:MM (east zone) or GMT-HH:MM (west zone).

Filtering native processing plugin

ParameterTypeRequiredExampleDefault valueDescription
TypestringYesprocessor_filter_regex_native/The plugin type. Set the value to processor_filter_regex_native.
IncludemapYes//The whitelist of log fields. The key is the field name and the value is a regular expression, which specifies the condition that the field content must meet for the current event to be collected. Multiple conditions are connected by the AND operator. A log is collected only when all conditions are met.

Data masking native processing plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_desensitize_nativeThe plugin type. Set the value to processor_desensitize_native.
SourceKeystringYes/contentThe name of the source field.
MethodstringYes/constThe data masking method. Valid values: const: replaces sensitive content with a constant. md5: replaces sensitive content with its MD5 hash value.
ReplacingStringstringNo. Required when Method is set to const/******The constant string used to replace sensitive content.
ContentPatternBeforeReplacedStringstringYes/'password:'The prefix regular expression for sensitive content.
ReplacedContentPatternstringYes/[^']*The regular expression for sensitive content.
ReplacingAllboolNotruetrueSpecifies whether to replace all matched sensitive content.

Extended processing plugins.

Extract fields.

Regex mode

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_regexThe plugin type. Set the value to processor_regex.
SourceKeystringYes/contentThe name of the source field.
RegexstringYes/(\d+-\d+-\d+)\s+(.*)The regular expression. You must use half-width parentheses () to enclose the fields to be extracted.
Keys[string]Yes/["ip", "time", "method"]The field names specified for the extracted content, such as ["ip", "time", "method"].
NoKeyErrorbooleanNofalsefalseSpecifies whether the system reports an error when the specified source field does not exist in the raw log.
  • true: reports an error.

  • false (default): does not report an error.

NoMatchErrorbooleanNofalsefalseSpecifies whether the system reports an error when the specified regular expression does not match the value of the source field.
  • true: reports an error.

  • false (default): does not report an error.

KeepSourcebooleanNofalsefalseSpecifies whether to retain the source field in the parsed log.
  • true: retains the source field.

  • false (default): does not retain the source field.

FullMatchbooleanNotruetrueSpecifies whether to extract fields only when a full match is achieved.
  • true (default): extracts field values only when all fields specified in the Keys parameter match the value of the source field by using the regular expression in the Regex parameter.

  • false: extracts fields even when only some fields match.

KeepSourceIfParseErrorbooleanYestruefalseSpecifies whether to retain the source field in the parsed log when log parsing fails.
  • true: retains the source field.

  • false (default): does not retain the source field.

Anchor mode

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_anchorThe plugin type. Set the value to processor_anchor.
SourceKeyAnchor arrayYes/contentThe name of the source field.
AnchorsstringYes/The list of anchor items.
StartStringYesEmptytimeThe start keyword. If this parameter is left empty, it matches the beginning of the string.
StopStringYesEmpty\tThe end keyword. If this parameter is left empty, it matches the end of the string.
FieldNameStringYesEmptytimeThe field name specified for the extracted content.
FieldTypeStringYesEmptystringThe field type. Valid values: string and json.
ExpondJsonbooleanNofalsefalseSpecifies whether to expand JSON.
  • true: expands JSON.

  • false (default): does not expand JSON.

ExpondConnecterStringNo__The connector used for JSON expansion. Default value: underscore (_).
MaxExpondDepthIntNo00The maximum depth for JSON expansion. Default value: 0, which indicates no limit.
NoAnchorErrorBooleanNofalsefalseSpecifies whether the system reports an error when no anchor item is found. {#3f246206721du}
  • true: reports an error.

  • false (default): does not report an error.

NoKeyErrorBooleanNofalsefalseSpecifies whether the system reports an error when the specified source field does not exist in the raw log.
  • true: reports an error.

  • false (default): does not report an error.

KeepSourceBooleanNofalsefalseSpecifies whether to retain the source field in the parsed log.
  • true: retains the source field.

  • false (default): does not retain the source field.

CSV mode

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_csvThe plugin type. Set the value to processor_csv.
SourceKeyStringYes/csvThe name of the source field.
SplitKeysString arrayYes/["date", "ip", "content"]The field names specified for the extracted content, such as ["date", "ip", "content"]. Important If the number of fields to be split is less than the number of fields in the SplitKeys parameter, the extra fields in the SplitKeys parameter are ignored.
PreserveOthersBooleanNofalsefalseSpecifies whether to retain the excess part when the number of fields to be split is greater than the number of fields in the SplitKeys parameter.
  • true: retains the excess part.

  • false (default): does not retain the excess part.

ExpandOthersBooleanNofalsefalseSpecifies whether to parse the excess part.
  • true: parses the excess part. You can use the ExpandOthers parameter to parse the excess part and then use the ExpandKeyPrefix parameter to specify the naming prefix for the excess fields.

  • false (default): does not parse the excess part. If you set PreserveOthers to true and ExpandOthers to false, the excess content is stored in the decode_preserve field.

Note If the excess field content contains non-standard content, you must normalize it according to the CSV format before storing it.
ExpandKeyPrefixStringNoThe naming prefix for the excess fields. For example, if this parameter is set to expand_, the field names are expand_1 and expand_2.
TrimLeadingSpaceBooleanNofalsefalseSpecifies whether to ignore leading spaces in field values.
  • true: ignores leading spaces.

  • false (default): does not ignore leading spaces.

SplitSepStringNo,,The delimiter. Default value: comma (,).
KeepSourceBooleanNofalsefalseSpecifies whether to retain the source field in the parsed log.
  • true: retains the source field.

  • false (default): does not retain the source field.

NoKeyErrorBooleanNofalsefalseSpecifies whether the system reports an error when the specified source field does not exist in the raw log.
  • true: reports an error.

  • false (default): does not report an error.

Single-character delimiter mode

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_split_charThe plugin type. Set the value to processor_split_char.
SourceKeyStringYesThe name of the source field.
SplitSepStringYesThe delimiter. It must be a single character and can be an invisible character, such as \u0001.
SplitKeysString arrayYes["ip", "time", "method"]The field names specified for the extracted content, such as ["ip", "time", "method"].
PreserveOthersBooleanNofalsefalseSpecifies whether to retain the excess part when the number of fields to be split is greater than the number of fields in the SplitKeys parameter.
  • true: retains the excess part.

  • false (default): does not retain the excess part.

QuoteFlagBooleanNofalsefalseSpecifies whether to use a quote character.
  • true: uses a quote character.

  • false (default): does not use a quote character.

QuoteStringNo/\u0001The quote character. It must be a single character and can be an invisible character, such as \u0001. This parameter takes effect only when QuoteFlag is set to true.
NoKeyErrorBooleanNofalsefalseSpecifies whether the system reports an error when the specified source field does not exist in the raw log.
  • true: reports an error.

  • false (default): does not report an error.

NoMatchErrorBooleanNofalsefalseSpecifies whether the system reports an error when the specified delimiter does not match the delimiter in the log.
  • true: reports an error.

  • false (default): does not report an error.

KeepSourceBooleanNofalsefalseSpecifies whether to retain the source field in the parsed log.
  • true: retains the source field.

  • false (default): does not retain the source field.

Multi-character delimiter mode

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_split_stringThe plugin type. Set the value to processor_split_string.
SourceKeyStringYesThe name of the source field.
SplitSepStringYesThe delimiter. It must be a single character. You can set it to an invisible character, such as \u0001 or \u0002.
SplitKeysString arrayYes["key1","key2"]The field names specified for the extracted content, such as ["key1","key2"]. Note If the number of fields to be split is less than the number of fields in the SplitKeys parameter, the extra fields in the SplitKeys parameter are ignored.
PreserveOthersBooleanNofalsefalseSpecifies whether to retain the excess part when the number of fields to be split is greater than the number of fields in the SplitKeys parameter.
  • true: retains the excess part.

  • false (default): does not retain the excess part.

ExpandOthersBooleanNofalsefalseSpecifies whether to use a quote character.
  • true: uses a quote character.

  • false (default): does not use a quote character.

ExpandKeyPrefixStringNo/expand_The naming prefix for the excess part. For example, if you set this parameter to expand_, the field names are expand_1 and expand_2.
NoKeyErrorBooleanNofalsefalseSpecifies whether the system reports an error when the specified source field does not exist in the raw log.
  • true: reports an error.

  • false (default): does not report an error.

NoMatchErrorBooleanNofalsefalseSpecifies whether the system reports an error when the specified delimiter does not match the delimiter in the log.
  • true: reports an error.

  • false (default): does not report an error.

KeepSourceBooleanNofalsefalseSpecifies whether to retain the source field in the parsed log.
  • true: retains the source field.

  • false (default): does not retain the source field.

Key-value pair mode

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_split_key_valueThe plugin type. Set the value to processor_split_key_value.
SourceKeystringYesThe name of the source field.
DelimiterstringNo\t\tThe delimiter between key-value pairs. Default value: tab (\t).
SeparatorstringNo::The delimiter between the key and the value in a single key-value pair. Default value: half-width colon (:).
KeepSourceBooleanNofalsefalseSpecifies whether to retain the source field in the parsed log.
  • true: retains the source field.

  • false (default): does not retain the source field.

ErrIfSourceKeyNotFoundBooleanNotruefalseSpecifies whether the system reports an error when the specified source field does not exist in the raw log.
  • true (default): reports an error.

  • false: does not report an error.

DiscardWhenSeparatorNotFoundBooleanNofalsefalseSpecifies whether to discard the key-value pair when no matching delimiter is found.
  • true: discards the key-value pair.

  • false (default): does not discard the key-value pair.

ErrIfSeparatorNotFoundBooleanNotruefalseSpecifies whether the system reports an error when the specified delimiter does not exist.
  • true (default): reports an error.

  • false: does not report an error.

ErrIfKeyIsEmptyBooleanNotruefalseSpecifies whether the system reports an error when the split key is empty.
  • true (default): reports an error.

  • false: does not report an error.

QuoteStringNoThe quote character. If this parameter is set and a value is enclosed by the quote character, the value within the quote character is extracted. Multi-character quote characters are supported. By default, the quote character feature is disabled. Important * If the quote character is a double quotation mark (""), you must add an escape character, which is a backslash (\). If a backslash (\) is used together with the quote character within the quote character, the backslash (\) is output as part of the value.

Grok mode

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_grokThe plugin type. Set the value to processor_grok.
CustomPatternDirString arrayNoThe directory where the custom Grok pattern files are located. The processor_grok plugin reads all files in the directory. If this parameter is not added, custom Grok pattern files are not imported. Important After you update the custom Grok pattern files, you must restart Logtail for the updates to take effect.
CustomPatternsMapNoThe custom Grok patterns. The key is the rule name, and the value is the Grok expression. For the default supported expressions, see processor_grok. If the link does not contain the expression you need, enter a custom Grok expression in Match. If this parameter is not added, custom Grok patterns are not used.
SourceKeyStringNocontentcontentThe name of the source field. Default value: content.
MatchString arrayYesThe array of Grok expressions. The processor_grok plugin matches logs against the expression list configured here from top to bottom, and returns the extraction result of the first successful match. Note Configuring multiple Grok expressions may affect performance. We recommend that you configure no more than 5 expressions.
TimeoutMilliSecondsLongNo0The maximum attempt time for extracting fields by using Grok expressions. Unit: milliseconds. If this parameter is not added or is set to 0, no timeout occurs.
IgnoreParseFailureBooleanNotruetrueSpecifies whether to ignore logs that fail to be parsed.
  • true (default): ignores the logs.

  • false: deletes the logs.

KeepSourceBooleanNotruetrueSpecifies whether to retain the source field after the log is successfully parsed.
  • true (default): retains the source field.

  • false: discards the source field.

NoKeyErrorBooleanNofalsetrueSpecifies whether the system reports an error when the specified source field does not exist in the raw log.
  • true: reports an error.

  • false (default): does not report an error.

NoMatchErrorBooleanNotruetrueSpecifies whether the system reports an error when none of the expressions set in the Match parameter match the log.
  • true (default): reports an error.

  • false: does not report an error.

TimeoutErrorBooleanNotruetrueSpecifies whether the system reports an error when a match times out.
  • true (default): reports an error.

  • false: does not report an error.

Add fields

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_add_fieldsThe plugin type. Set the value to processor_add_fields.
FieldsMapYesThe names and values of the fields to be added. The format is key-value pairs. You can add multiple fields.
IgnoreIfExistBooleanNofalsefalseSpecifies whether to ignore duplicate fields when fields with the same name exist.
  • true: ignores the duplicate fields.

  • false (default): does not ignore the duplicate fields.

Drop fields

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_dropThe plugin type. Set the value to processor_drop.
DropKeysString arrayYesThe fields to be dropped. You can specify multiple fields.

Rename fields

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_renameThe plugin type. Set the value to processor_rename.
NoKeyErrorBooleanNofalsefalseSpecifies whether the system reports an error when the specified source field does not exist in the log.
  • true: reports an error.

  • false (default): does not report an error.

SourceKeysString arrayYesThe source fields to be renamed.
DestKeysString arrayYesThe renamed fields.

Pack fields

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_packjsonThe plugin type. Set the value to processor_packjson.
SourceKeysString arrayYesThe source fields to be packed.
DestKeyStringNoThe packed field.
KeepSourceBooleanNotruetrueSpecifies whether to retain the source fields in the parsed log.
  • true (default): retains the source fields.

  • false: discards the source fields.

AlarmIfIncompleteBooleanNotruetrueSpecifies whether the system reports an error when the specified source fields do not exist in the raw log.
  • true (default): retains.

  • false: discards.

Expand JSON fields

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_jsonThe plugin type. Set the value to processor_json.
SourceKeyStringYesThe name of the source field to be expanded.
NoKeyErrorBooleanNotruetrueSpecifies whether the system reports an error when the specified source field does not exist in the raw log.
  • true (default): reports an error.

  • false: does not report an error.

ExpandDepthIntNo01The depth of JSON expansion. Default value: 0, which indicates no limit. 1 indicates the current level, and so on.
ExpandConnectorStringNo__The connector used when expanding JSON. Default value: underscore (_).
PrefixStringNoThe prefix attached to the field names when expanding JSON.
KeepSourceBooleanNotruetrueSpecifies whether to retain the source field in the parsed log.
  • true (default): retains the source field.

  • false: discards the source field.

UseSourceKeyAsPrefixBooleanNoSpecifies whether to use the source field name as the prefix for all expanded JSON field names.
KeepSourceIfParseErrorBooleanNotruetrueSpecifies whether to retain the raw log when log parsing fails.
  • true (default): retains the raw log.

  • false: discards the raw log.

ExpandArrayBooleanNofalsefalseSpecifies whether to expand array types. This parameter is supported in Logtail 1.8.0 and later.
  • false (default): does not expand array types.

  • true: expands array types. For example, {"k":["1","2"]} is expanded to {"k[0]":"1","k[1]":"2"}.

Filter logs

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_filter_regexThe plugin type. Set the value to processor_filter_regex.
IncludeJSON objectNoThe key is the log field, and the value is the regular expression that matches the field value. The relationship between key-value pairs is AND. If the value of the log field matches the corresponding regular expression, the log is collected.
ExcludeJSON objectNoThe key is the log field, and the value is the regular expression that matches the field value. The relationship between key-value pairs is OR. If the value of any field in the log matches the corresponding regular expression, the log is discarded.

Extract log time

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_gotimeThe plugin type. Set the value to processor_gotime.
SourceKeyStringYesThe name of the source field.
SourceFormatStringYesThe format of the source time.
SourceLocationIntYesThe time zone of the source time. If this parameter is empty, it indicates the time zone of the host or container where Logtail resides.
DestKeyStringYesThe destination field after parsing.
DestFormatStringYesThe time format after parsing.
DestLocationIntNoThe time zone after parsing. If this parameter is empty, it indicates the local time zone.
SetTimeBooleanNotruetrueSpecifies whether to set the parsed time as the log time.
  • true (default): yes.

  • false: no.

KeepSourceBooleanNotruetrueSpecifies whether to retain the source field in the parsed log.
  • true (default): retains the source field.

  • false: does not retain the source field.

NoKeyErrorBooleanNotruetrueSpecifies whether the system reports an error when the specified source field does not exist in the raw log.
  • true (default): reports an error.

  • false: does not report an error.

AlarmIfFailBooleanNotruetrueSpecifies whether the system reports an error when log time extraction fails.
  • true (default): reports an error.

  • false: does not report an error.

Convert IP addresses

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_geoipThe type of the plugin. Set the value to processor_geoip.
SourceKeyStringYesThe name of the original field whose IP address you want to convert.
DBPathStringYes/user/data/GeoLite2-City_20180102/GeoLite2-City.mmdbThe full path of the GeoIP database. Example: /user/data/GeoLite2-City_20180102/GeoLite2-City.mmdb.
NoKeyErrorBooleanNofalsefalseSpecifies whether the system reports an error if the specified original field does not exist in the raw log.
  • true: The system reports an error.

  • false (default): The system does not report an error.

NoMatchErrorBooleanNotruetrueSpecifies whether the system reports an error if the IP address is invalid or not found in the database.
  • true (default): The system reports an error.

  • false: The system does not report an error.

KeepSourceBooleanNotruetrueSpecifies whether to retain the original field in the parsed log.
  • true (default): The original field is retained.

  • false: The original field is not retained.

LanguageStringNozh-CNzh-CNThe language attribute. Default value: zh-CN. Important Make sure that your GeoIP database contains the specified language.

Data masking

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_desensitizeThe type of the plugin. Set the value to processor_desensitize.
SourceKeyStringYesThe name of the log field.
MethodStringYesconstThe masking method. Valid values:
  • const: Replaces sensitive content with a string. You can use the ReplaceString parameter to specify the target string.

  • md5: Replaces sensitive content with the corresponding MD5 hash value.

MatchStringNofullfullThe method used to extract sensitive content. Valid values:
  • full (default): Extracts all content, which means all content in the target field value is replaced.

  • regex: Uses a regular expression to extract sensitive content.

ReplaceStringStringNoThe string used to replace sensitive content. This parameter is required if you set Method to const.
RegexBeginStringNoThe regular expression used to match the prefix of sensitive content. This parameter is required if you set Match to regex.
RegexContentStringNoThe regular expression used to match sensitive content. This parameter is required if you set Match to regex.

Field value mapping

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_dict_mapThe type of the plugin. Set the value to processor_dict_map.
SourceKeyStringYesThe name of the original field.
MapDictMapNoThe mapping dictionary. If the mapping dictionary is small, you can configure it directly by using this parameter without providing a local CSV dictionary file. Important If you configure the DictFilePath parameter, the configuration in the MapDict parameter does not take effect.
DictFilePathStringNoThe path of the dictionary file in CSV format. The CSV file uses commas (,) as separators and double quotation marks (") for field references.
DestKeyStringNoThe name of the mapped field.
HandleMissingBooleanNofalsefalseSpecifies whether the system processes the log if the target field is missing in the raw log.
  • true: The system processes the log and fills the missing field with the value specified by the Missing parameter.

  • false (default): The system does not process the log.

MissingStringNoUnknownUnknownThe fill value for the missing target field in the raw log. Default value: Unknown. The parameter settings take effect only when HandleMissing is set to true.
MaxDictSizeIntNo10001000The maximum size of the mapping dictionary. Default value: 1000, which means up to 1,000 mapping rules can be stored. To limit the memory usage of the plugin on the server, you can decrease this value.
ModeStringNooverwriteoverwriteThe processing method when the mapped field already exists in the raw log.
  • overwrite (default): Overwrites the original field.

  • fill: Does not overwrite the original field.

Field encryption

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_encryptThe type of the plugin. Set the value to processor_encrypt.
SourceKeyString arrayYesThe name of the original field.
EncryptionParametersObjectYesThe key-related configurations.
KeyStringYesThe encryption key, which must be 64 hexadecimal characters.
IVStringNo00000000000000000000000000000000The initialization vector for encryption, which must be 32 hexadecimal characters. Default value: 00000000000000000000000000000000.
KeyFilePathBooleanNoThe path of the file from which encryption parameters are read. If this parameter is not configured, the file is read based on Logtail configuration - Input configuration - File path.
KeepSourceValueIfErrorStringNofalsefalseSpecifies whether the system retains the value of the original field if encryption fails.
  • true: The value is retained.

  • false (default): The value is not retained.

If encryption fails, the field value is replaced with ENCRYPT_ERROR.

String replacement

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_string_replaceThe type of the plugin. Set the value to processor_string_replace.
SourceKeyStringYesThe name of the original field.
MethodStringYesThe matching method. Valid values:
  • const: Uses string replacement.

  • regex: Uses regular expression replacement.

  • unquote: Removes escape characters.

MatchStringNoThe match content.
  • If you set Method to const, enter the string that matches the content to be replaced. If multiple strings match, all of them are replaced.

  • If you set Method to regex, enter the regular expression that matches the content to be replaced. If multiple strings match, all of them are replaced. You can also use regular expression groups to match specific groups.

  • If you set Method to unquote, you do not need to configure this parameter.

ReplaceStringStringNoThe string used for replacement. Default value: "".
  • If you set Method to const, enter the string used to replace the original content.

  • If you set Method to regex, enter the string used to replace the original content. Replacement based on regular expression groups is supported.

  • If you set Method to unquote, you do not need to configure this parameter.

DestKeyStringNoThe new field for the replaced content. By default, no new field is added.

Data encoding and decoding

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_base64_encodingThe type of the plugin. Set the value to processor_base64_encoding.
SourceKeyStringYesThe name of the original field.
NewKeyStringYesThe name of the result field after encoding.
NoKeyErrorBooleanNofalsefalseSpecifies whether the system reports an error if the specified original field does not exist in the raw log.
  • true: The system reports an error.

  • false (default): The system does not report an error.

Convert logs to metrics

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_log_to_sls_metricThe type of the plugin. Set the value to processor_log_to_sls_metric.
MetricTimeKeyStringNoThe time field in the log, which is mapped to the __time_nano__ field in the time series data. By default, the value of the __time__ field in the log is extracted. Make sure that the specified field is a valid and properly formatted timestamp. Unix timestamps in seconds (10 digits), milliseconds (13 digits), microseconds (16 digits), and nanoseconds (19 digits) are supported.
MetricLabelKeys[]StringYesThe list of keys for the __labels__ field. The keys must follow the regular expression ^[a-zA-Z_][a-zA-Z0-9_]*$. The values cannot contain vertical bars (|) or #$#. For more information, see Time series data (Metric). You cannot add the __labels__ field to the MetricLabelKeys parameter. If the __labels__ field exists in the original fields, its value is appended to the new __labels__ field.
MetricValuesMapYesThe metric names and metric values. The metric name corresponds to the __name__ field and must follow the regular expression ^[a-zA-Z_:][a-zA-Z0-9_:]*$. The metric value corresponds to the __value__ field and must be of the Double type. For more information, see Time series data (Metric).
CustomMetricLabelsMapNoThe custom __labels__ field. The keys must follow the regular expression ^[a-zA-Z_][a-zA-Z0-9_]*$, and the values cannot contain vertical bars (|) or #$#. For more information, see Time series data (Metric).
IgnoreErrorBooleanNoSpecifies whether to output error logs when no matching logs are found. Default value: false, which indicates that error logs are not output.

Convert logs to traces

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/processor_otel_traceThe type of the plugin. Set the value to processor_otel_trace.
SourceKeyStringYesThe name of the original field.
FormatStringYesjsonThe format after conversion. Valid values: protobuf, json, and protojson.
NoKeyErrorBooleanNofalsetrueSpecifies whether to report an error if the corresponding original field does not exist in the log. Default value: false.
TraceIDNeedDecodeBooleanNoSpecifies whether to perform Base64 decoding on the TraceID. Default value: false. If you set Format to protojson and the TraceID is already Base64-encoded, you must set TraceIDNeedDecode to true. Otherwise, the conversion fails.
SpanIDNeedDecodeBooleanNoSpecifies whether to perform Base64 decoding on the SpanID. Default value: false. If you set Format to protojson and the SpanID is already Base64-encoded, you must set SpanIDNeedDecode to true. Otherwise, the conversion fails.
ParentSpanIDNeedDecodeBooleanNoSpecifies whether to perform Base64 decoding on the ParentSpanID. Default value: false. If you set Format to protojson and the ParentSpanID is already Base64-encoded, you must set ParentSpanIDNeedDecode to true. Otherwise, the conversion fails.

Output plugins.

SLS output plugin

ParameterTypeRequiredDefault valueExampleDescription
TypestringYes/flusher_slsThe type of the plugin. Set the value to flusher_sls.
LogstorestringYes/test-logstoreThe name of the Logstore.

Response elements

Element

Type

Description

Example

None defined.

Examples

Success response

JSON format

{}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.