Torch Log Service
Parameter | Type | Required | Example value | Description |
Parameter | Type | Required | Example value | Description |
TopicName | String | Yes | test-topic | |
ProjectId | String | Yes | c7*********** | The ID of the project to which the log topic belongs. |
Ttl | Integer | Yes | 1300 | The total retention period for logs in TLS. Expired logs in this topic are automatically deleted after the specified log storage period. Unit: days. Default is 30 days. Range: 1 to 3650 days. 3650 days indicates permanent storage. tip After setting EnableHotTtl to true, the Ttl duration must match the total value of HotTtl, ColdTtl, and ArchiveTtl. |
ShardCount | Integer | Yes | 2 | The number of log shards. By default, 1 shard is created. The value ranges from 1 to 10 Each shard provides write capacity of 5 MiB/s and 500 times/s, and read capacity of 20 MiB/s and 100 times/s Plan the number of shards reasonably when creating a log topic. The number of shards cannot be changed after creation |
AutoSplit | Boolean | No | true | Automatic sharding can be enabled or disabled.
|
MaxSplitShard | Integer | No | 50 | Maximum number of shard splits, i.e., the maximum number of partitions after splitting. The value range is 1 to 256, and the default value is 256. tip
|
EnableTracking | Boolean | No | false | WebTracking can be enabled or disabled. If enabled, you can quickly collect frontend tracking data through it.
tip After enabling WebTracking for a log topic, data written through the WebTracks API no longer needs authentication. This grants anonymous write access over the public network, but it may result in dirty data. For details, see Collect logs by using WebTracking. |
Description | String | No | This is a test topic. | Log topic description.
|
Tags | No | [{"Key":"key1", "Value":"value1"}] | Log topic tag information. Tags identify and classify cloud resources. You can categorize log projects and topics by tags to facilitate resource search and aggregation. For details, see tag management. | |
LogPublicIP | Boolean | No | false | Enable or disable the function to record extranet IP addresses. By default, it is enabled. When enabled, TLS automatically adds the following metadata fields to log entries.
tip When logs are written via WebTracking, TLS records public IP address of source device through clientAddr. |
EnableHotTtl | Boolean | No | false | Enable hierarchical storage. Once enabled, TLS supports standard storage, infrequent storage, and archive storage. After setting HotTtl, ArchiveTtl, and ColdTtl, if data is stored longer than the specified period, it is automatically moved to infrequent or archive storage for subsequent retention until the total log collection duration reaches the Ttl period, when it is automatically cleared by the backend. tip
|
HotTtl | Integer | No | 30 | Standard storage duration. The default duration is 30 days, and the value range is 7 to 3650. This parameter takes effect only when EnableHotTtl is set to true. |
ColdTtl | Integer | No | 30 | Low-frequency storage duration. The range for this duration is 1–3650. Low-frequency storage is available for standard storage periods of 7 days or longer This parameter is effective only when EnableHotTtl is set to true |
ArchiveTtl | Integer | No | 60 | Archive storage duration. The valid range for this duration is 60 to 3650. Archive storage can be enabled when any of the following conditions are met.
This parameter is effective only when EnableHotTtl is set to true. |
Parameter | Type | Required | Example value | Description |
Parameter | Type | Required | Example value | Description |
Key | String | No | owner | |
Value | String | No | zhangsan |
Parameter | Type | Example value | Description |
Parameter | Type | Example value | Description |
TopicId | String | b*********** | Log topic ID. |
HTTP status code | Error Code | Error message | Description |
HTTP status code | Error Code | Error message | Description |
400 | InvalidArgument | Invalid argument key %s, value %s, please check argument. | Invalid parameter. |
400 | TopicQuotaExceed | Topic Quota Exceed. | Exceeded the quota for log topics |
409 | TopicAlreadyExist | Topic xxx already exist. | The log topic already exists. |
500 | InternalServerError | We encountered an unexpected server error, please try again later. | Internal server error. |