全部产品
Search
文档中心

日志服务:LogtailConfig

更新时间:Aug 28, 2026

名称

类型

描述

示例值

object

Logtail 配置数据结构。

configName

string

Logtail 配置的名称,在其所属 Project 内必须唯一。创建 Logtail 配置成功后,无法修改其名称。命名规则如下:

  • 只能包括小写字母、数字、短划线(-)和下划线(_)。

  • 必须以小写字母或者数字开头和结尾。

  • 长度必须在 2~128 字符之间。

test-config

logSample

string

日志样例。

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

inputType

string

日志输入的方式。可选值如下:

  • plugin:通过 Logtail 插件采集 MySQL Binlog 等日志。

  • file:通过固定模式(正则模式、分隔符模式等)采集文本文件中的日志。

file

inputDetail

object

日志输入的相关配置。更多信息,请参见 inputDetail 参数说明

"logType": "common_reg_log", "logPath": "/var/log/httpd/", "filePattern": "access*.log", "localStorage": true, "timeFormat": "%Y/%m/%d %H:%M:%S", "logBeginRegex": ".*", "regex": "(\w+)(\s+)", "key" :["key1", "key2"], "filterKey":["key1"], "filterRegex":["regex1"], "fileEncoding":"utf8", "topicFormat": "none"

outputType

string

日志输出的方式,只支持 LogService,即只支持将数据上传到日志服务。

LogService

outputDetail

object

日志输出的相关配置。更多信息,请参见 outputDetail 参数说明

endpoint

string

服务入口。更多信息,请参见服务入口

cn-hangzhou-intranet.log.aliyuncs.com

logstoreName

string

Logstore 名称。

test-logstore

region

string

地域 ID。

cn-hangzhou

telemetryType

string

目标 Logstore 的可观测数据类型。

logs

createTime

integer

Logtail 配置创建时间。UNIX 时间戳格式,表示从 1970-1-1 00:00:00 UTC 计算起的秒数。

1655176807

lastModifyTime

integer

Logtail 配置最后一次更新时间。UNIX 时间戳格式,表示从 1970-1-1 00:00:00 UTC 计算起的秒数。

1655176807