All Products
Search
Document Center

Simple Log Service:LogtailConfig

Last Updated:Oct 29, 2024
ParameterTypeDescriptionExample
object

The data structure of the Logtail configuration.

configNamestring

The name of the Logtail configuration. The name must be unique in the project to which the Logtail configuration belongs. After the Logtail configuration is created, you cannot change the name of the Logtail configuration. The name must meet the following requirements:

  • 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
logSamplestring

The sample log.

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

The type of the data source. Valid values:

  • plugin: Logs such as MySQL binary logs are collected by using Logtail plug-ins.
  • file: Logs from text files are collected by using existing modes, including the full regex mode and delimiter mode.
file
inputDetailobject

The detailed settings of the data source. For more information, see 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

The type of the data destination. Set the value to LogService. Collected logs can be uploaded to only Simple Log Service.

LogService
outputDetailobject

The detailed settings of the data destination. For more information, see outputDetail .

endpointstring

The endpoint. For more information, see Endpoints .

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

The name of the Logstore.

test-logstore
regionstring

The ID of the region.

cn-hangzhou
telemetryTypestring

The type of observable data in the Logstore.

logs
createTimelong

The time at which the Logtail configuration was created. The value is a UNIX timestamp representing the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1655176807
lastModifyTimelong

The time at which the Logtail configuration was last modified. The value is a UNIX timestamp representing the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1655176807