All Products
Search
Document Center

Simple Log Service:Logstores

Last Updated:Oct 26, 2023

A Logstore in Log Service is used for log collection, storage, and queries.

  • Logstore naming rules
    • The name can contain lowercase letters, digits, hyphens (-), and underscores (_).
    • The name must start and end with a lowercase letter or digit.
    • The name must be 3 to 63 characters in length.
  • Example Logstore
    {
        "logstoreName" : "access_log",
        "ttl": 1,
        "shardCount": 2,
        "autoSplit": true,
        "maxSplitShard": 64,
        "createTime":1439538649,
        "lastModifyTime":1439538649
    }
  • Example parameters description
    ParameterTypeRequiredDescription
    logstoreNameStringYesThe name of the Logstore. The name must be unique in a project.
    ttlIntegerYesThe time to live (TTL) of log data. Unit: days. Minimum value: 1.
    shardCountIntegerYesThe number of shards in the Logstore.
    autoSplitBooleanNoSpecifies whether to enable automatic sharding.
    maxSplitShardIntegerNoThe maximum number of shards for automatic sharding. Minimum value: 1. Maximum value: 64. This parameter must be specified if the autoSplit parameter is set to true.
    createTimeIntegerNoThe time when the Logstore was created.
    lastModifyTimeIntegerNoThe time when the Logstore was last modified.