All Products
Search
Document Center

Simple Log Service:Manage logs

Last Updated:Jan 31, 2024

How does Simple Log Service store and manage user logs?

A Logstore is the basic unit that is used to store and query logs in Simple Log Service. In most cases, a Logstore is used to store a type of log data. Currently, you can add, delete, modify, and query Logstores in the Simple Log Service console or by using the API. After a Logstore is created, you can write logs to the Logstore by using the API or SDK. Simple Log Service also provides Logtail to help you collect log data from Alibaba Cloud Elastic Compute Service (ECS) instances in an efficient manner.

Are logs lost when I delete a Logstore?

If you delete a Logstore, all log data that is stored in the Logstore is also deleted. Proceed with caution when you perform this operation.

How long is log data stored in Simple Log Service? Can I change the data retention period?

The following features of Simple Log Service involve the data retention period of logs:

  • LogHub and LogSearch: You can specify a data retention period based on your business requirements.

  • LogShipper: After logs are shipped to Object Storage Service (OSS) or MaxCompute, you can specify a data retention period in OSS or MaxCompute.

If I want to store logs to OSS, how do I reduce costs in Simple Log Service?

You are charged specific fees when you use the powerful indexing and analysis features of Simple Log Service. If you want to only store logs to OSS and do not have custom requirements for log query and analysis, you can use the following methods to reduce costs in Simple Log Service:

Usage notes

  • By default, the indexing feature is disabled. If the indexing and analysis features are disabled, you can shorten the data retention period of a Logstore to reduce data storage costs.

  • After you disable the indexing and analysis features, relevant features also become unavailable, such as log query by keyword, log statistical analysis, dashboards, and alerting. Proceed with caution when you perform this operation.

  • Change the data retention period of a Logstore.

    You can change the data retention period of a Logstore to one day. Specific charges for storing data in a Logstore are included into your Simple Log Service bill. Therefore, you can shorten the data retention period to reduce costs.

  • Disable the indexing feature.

    1. Enable the OSS data shipping feature to ship log data from a Logstore to OSS for storage in a quasi-real-time manner.

    2. On the Logstores tab in the left-side navigation pane, click Search & Analysis next to a Logstore.

    3. Delete all indexes and disable the indexing feature.

After the indexing and analysis features are disabled, you are charged only small fees for using LogHub. For more information, see Pay-by-feature.

How do I view the size of a Logstore?

The log storage capacity of a Logstore is a billable item of Simple Log Service. You can use CloudLens for SLS to view the log storage capacity of a Logstore. Before you begin, make sure that you have read and understood the relevant usage notes. This helps you perform operations with ease. For more information, see Usage notes.