A Logstore is a storage unit in Simple Log Service (SLS) used to collect, store, and query log data.
Core concepts
What is a Logstore?
A Logstore is a data container in Simple Log Service. You can create multiple Logstores under a Project to isolate and manage logs from different applications or sources.
Additionally, certain Alibaba Cloud services or SLS features automatically create dedicated Logstores for specific purposes. These Logstores cannot accept other types of data. Examples include the following:
internal-operation_log: stores detailed operation logs generated by Simple Log Service itself.oss-log-store: automatically created when you configure OSS access logs for archival.
LogStore specification comparison
Simple Log Service offers two Logstore types—Standard and Query—that differ in features and cost.
Type | Cost (Index Traffic Fee Comparison) | Scenarios |
Standard | CNY 0.350/GB | Use this type for interactive analytics, real-time monitoring, visualization, or building observability systems. |
Query type (Query) | CNY 0.1/GB | This type does not support analytics. Use it for log archival, audit log storage, or troubleshooting scenarios where you only need fast keyword search without analysis. Typical use cases include long-term retention (months or years) with infrequent access. |
Scope and permissions
Create a basic Logstore
Console
Log on to the Simple Log Service console. In the Project list, click the target Project.
On the tab, click the + icon.
On the Create Logstore page, configure the settings and click OK.
Logstore type: Standard by default.
Billing mode:
Pay-by-feature (cannot be changed): You are billed separately for each resource used (such as storage, indexing, and read/write operations) and receive a monthly free quota, which helps control costs in small-scale scenarios.
Pay-by-ingested-data: You pay only for the raw ingested data volume. Storage and core features are free for 30 days, offering a simpler and more cost-effective pricing model.
Quick tip: The closer your retention period is to 30 days and the more fields you index (especially full-text indexing), the more suitable pay-by-ingested-data becomes.
Logstore name: Must be unique within the Project and cannot be changed after creation.
Data retention period: 30 days by default.
Keep all other settings at their default values.
API
Modify Logstore configuration
You can configure the following parameters during creation. This section uses Logstore modification as an example.
Click
Log Storage. On the Logstores page, hover over the target Logstore and select .In the Logstore properties, modify the relevant settings based on your scenario.
Delete specific logs or set log retention period
Console
In Basic Information, click Modify, adjust the data retention period, and click Save.
Simple Log Service does not support deleting specific log entries. You can only delete logs by time using the retention period setting or by stopping billing or deleting the Logstore to remove all logs.
Specified Days: Valid values: 1–3650. Setting this to 3650 means permanent retention. Logs are deleted when the retention period ends.
Permanent Storage: Retains logs in the Logstore indefinitely.
Changes take effect immediately, but deleting expired data may take some time.
API
Adjust the log retention period by updating the ttl value in Update Logstore.
Optimize storage costs using tiering
Console
In Basic Information, click Modify and enable intelligent tiering.
Configure the Storage Policy: The sum of days across all three tiers must equal the total data retention period.
Hot storage: minimum 7 days.
IA storage class: minimum 30 days.
Archive Storage: minimum 60 days.
Set Data retention period to Limited days, enable Intelligent tiering, and configure tier transitions in Storage policy: hot storage automatically transitions to IA storage after its period ends, IA storage transitions to Archive Storage, and Archive Storage is automatically deleted after its period ends.
Click Save. For details, see Intelligent tiering.
API
Dynamically adjust the retention policy for storage tiers by updating the ttl, hot_ttl, and infrequentAccessTTL values in Update Logstore.
Collect frontend logs
Simple Log Service provides WebTracking to collect logs from mini programs, mobile apps (iOS/Android), and browsers.
You can use this feature in two ways:
Use STS authentication for transmission. This method is suitable for production environments and does not require Logstore configuration changes.
Use anonymous transmission via OpenAPI. This method is for testing only and requires enabling a setting in the Logstore, as described below.
Console
In Basic Properties, click Modify, enable WebTracking, and click Save.
API
Enable WebTracking by setting the enable_tracking parameter to true in Update Logstore.
Add public IP and log arrival time automatically
When enabled, subsequent log ingestion automatically adds:
__tag__:__client_ip__: the public IP address of the log source device.
__tag__:__receive_time__: the time the log arrives at the Simple Log Service server, formatted as a UNIX timestamp (seconds since 1970-01-01 00:00:00 UTC).
Console
In Basic Properties, click Modify, enable Record public IP, and click Save.
API
Enable public IP recording by setting the appendMeta parameter in Update Logstore.
Adjust ingestion performance using shards
Each shard supports 5 MB/s or 500 writes per second for ingestion, and 10 MB/s or 100 reads per second for consumption. These are soft limits. The system tries to serve requests beyond these limits but does not guarantee quality of service. If traffic exceeds a shard’s capacity, split the shard to increase capacity.
Console
In Basic Properties, click Modify, enable Automatic sharding, set the shard limit, and click Save.
Simple Log Service supports splitting and merging individual shards.
API
Stop billing or delete Logstore
Once deleted, all log data in the Logstore is permanently lost and cannot be recovered. Proceed with caution.
Console
Clean up before deletion.
Delete all associated Logtail configurations before deleting the Logstore.
If LogShipper is enabled for this Logstore, stop writing new data and confirm all existing data has been successfully shipped before deletion.
In the section, review all tasks for the current Project and delete any tasks associated with this Logstore.
Deletion steps.
On the tab, hover over the target Logstore and select .
In the Warning dialog box, click Confirm Deletion.
Post-deletion notes.
Storage fees still apply on the day of deletion. No fees accrue from the next day onward. You will not receive a bill for this Logstore starting on the third day after deletion.
After deletion, all export tasks, data transformation jobs, scheduled SQL tasks using this Logstore as a source, and import tasks targeting this Logstore are deleted.
API
Configuration examples for real-world scenarios
Real-time monitoring and analysis for high-volume workloads
Your online application generates large volumes of logs in real time. When failures occur, you need to quickly locate error logs and monitor performance metrics (such as QPS and response latency) with real-time alerts.
Recommended configuration: Standard Logstore + pay-by-ingested-data + automatic sharding.
Reason: Standard Logstore supports analytics, real-time monitoring, and visualization. With high ingestion volume and potential need for extensive indexing, pay-by-ingested-data offers better cost efficiency, and automatic sharding ensures consistent ingestion and analysis performance.
Compliance, auditing, and regulatory scenarios
Industry regulations require storing user operation logs and security logs for more than six months for auditing, but daily query and analysis frequency is very low.
Recommended configuration: Query Logstore + intelligent tiering.
Reason: Query Logstore supports search-only workloads at a lower index traffic cost than Standard. Intelligent tiering reduces long-term storage costs by automatically moving older logs to lower-cost storage tiers.
Related references
Logstore comparison under pay-by-feature billing
Query Logstores support only pay-by-feature billing. Under this model, Standard and Query Logstores compare as follows:
Comparison Item | Standard | Query Specification | |
Cost | CNY 0.350/GB | CNY 0.1/GB | |
Features | Data ingestion (for application logs only) | Supported | Does not support cloud product log ingestion. |
Supported | Supported | ||
Supported | Supported | ||
Analytics (SQL statement) | Supported | Not supported | |
Supported | Supported | ||
Supported | Supported | ||
Supported | Not supported | ||
Supported | Supported | ||
Supported | Not supported | ||
Supported | Supports only query-based alerts | ||
Supported | Not supported | ||
Supported | Supported | ||
Supported | Supported | ||
Supported | Supported | ||
Limits
Pay-by-ingested-data supports the full SLS feature set. Value-added features such as query and analysis, data transformation, intelligent alerting, and consumption/shipping incur no extra charges but are subject to quota limits as follows.
Quota limit | Description |
Data transformation volume | Maximum 100 TB per Logstore per month. |
Scheduled SQL data volume | Maximum 20 TB per Logstore per month. |
Shipping data volume | Maximum 100 TB per Logstore per month. |
Consumption data volume | Maximum 100 TB per Logstore per month. |
Alert job computation volume | Maximum 100 TB per Logstore per month. |
Billing overview
Logstore costs depend primarily on the selected billing mode.
Pay-by-feature: You are billed separately for actual usage of resources such as storage capacity, index traffic, read/write operations, and shard count.
Pay-by-ingested-data: You pay only for the raw ingested data volume, with 30 days of free storage and multiple free features included.
Key pricing details:
Standard index traffic: CNY 0.350 /GB.
Query index traffic: CNY 0.1 /GB.
Cost optimization tips:
If your log retention period is close to or exceeds 30 days, pay-by-ingested-data is usually more cost-effective.
For archival and retrieval-only scenarios, use Query Logstores to reduce indexing costs.
Use intelligent tiering to move infrequently accessed data to lower-cost storage tiers.
FAQ
Cannot create a Logstore
By default, you can create up to 200 Logstores per Project. Delete unused Logstores or request a quota increase as follows.
Log on to the Simple Log Service console, and click the target Project in the Project list.
On the Project page, go to Overview > Basic Information > Resource Quota and click Manage. In the Resource Quotas panel, adjust the Logstore quota limit and click Save to submit your request. Allow about one hour for the change to take effect.
Are logs missing in Simple Log Service?
Project or Logstore missing
If you manually delete a Project or Logstore, logs cannot be recovered. Use ActionTrail to check for deletion events within the last 90 days.
No logs were collected. For more information, see Troubleshooting Guide for LoongCollector Log Collection Issues.
If your account remains overdue for more than 7 days, the service is considered abandoned. Projects are reclaimed and data is permanently deleted. For details, see Overdue payments.
How can I reduce log storage costs?
To check your SLS billing, see View SLS storage capacity and consumption records.
Download historical logs locally or ship them to OSS for storage.