帮助文档 Logo
平台使用
阿里云
百度云
移动云
智算服务
教育生态
登录 →
帮助文档 Logo
平台使用 阿里云 百度云 移动云 智算服务 教育生态
登录
  1. 首页
  2. 阿里云
  3. 日志服务
  4. 开发参考
  5. API参考
  6. 数据结构
  7. LogtailConfig

LogtailConfig

  • 数据结构
  • 发布于 2025-04-22
  • 0 次阅读
文档编辑
文档编辑
名称类型描述示例值
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
telemetryTypestring

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

logs
createTimelong

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

1655176807
lastModifyTimelong

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

1655176807
相关文章

Alert 2025-04-22 10:37

AlertConfiguration 2025-04-22 10:37

AlertQuery 2025-04-22 10:37

AlertTag 2025-04-22 10:37

ConditionConfiguration 2025-04-22 10:37

ConsumerGroup 2025-04-22 10:37

目录
Copyright © 2025 your company All Rights Reserved. Powered by 博智数字服务平台.
闽ICP备08105208号-1