文档

LogtailConfig

更新时间:
名称类型描述示例值
object

Logtail 配置数据结构。

configNamestring

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

  • 只能包括小写字母、数字、短划线(-)和下划线(_)。
  • 必须以小写字母或者数字开头和结尾。
  • 长度必须在 2~128 字符之间。
test-config
logSamplestring

日志样例。

2022-06-14 11:13:29.796 | DEBUG | __main__:<module>:1 - hello world
inputTypestring

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

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

日志输入的相关配置。更多信息,请参见 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"
outputTypestring

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

LogService
outputDetailobject

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

endpointstring

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

cn-hangzhou-intranet.log.aliyuncs.com
logstoreNamestring

Logstore 名称。

test-logstore
regionstring

地域 ID。

cn-hangzhou
createTimelong

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

1655176807
lastModifyTimelong

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

1655176807
  • 本页导读
文档反馈