All Products
Search
Document Center

Simple Log Service:Manage an Eventstore

Last Updated:Feb 18, 2024

If you delete an Eventstore, the events in the Eventstore are deleted and cannot be restored. To delete events, you can shorten the data retention period of the Eventstore. This topic describes how to create, modify, and delete an Eventstore in the Simple Log Service console. This topic also describes how to delete events.

Term

An Eventstore is used to collect, store, and query events in Simple Log Service. Each Eventstore belongs to a project. You can create multiple Eventstores in a project. For more information, see Eventstore.

Prerequisites

A project is created. For more information, see Manage a project.

Create an Eventstore

  1. Log on to the Simple Log Service console.

  2. In the Projects section, click the project that you want to manage.

  3. On the Event Storage > Eventstores tab, click the image..png icon.

  4. In the Create Eventstore panel, configure the following parameters and click OK.

    Parameter

    Description

    Eventstore Name

    The name of the Eventstore. The name must be unique in the project to which the Eventstore belongs. After the Eventstore is created, you cannot change the name of the Eventstore.

    Important

    The name of an Eventstore must be different from the name of a Logstore or Metricstore in the project to which the Eventstore belongs.

    Data Retention Period

    The retention period of the collected events in the Eventstore.

    • If you select Specified Days for Data Retention Period, you can specify how many days you want to store events based on your business requirements. For more information, see the "Log retention period" item in Basic resources.

    • If you select Permanent Storage for Data Retention Period, Simple Log Service permanently stores the collected events in the Eventstore.

      Note

      If you query the data retention period by calling an SDK and the returned result is 3650, events are permanently stored.

    Intelligent Tiered Storage

    If you turn on Intelligent Tiered Storage, you can store data in the hot storage tier, Infrequent Access (IA) storage tier, or Archive storage tier based on your business requirements.

    • You can specify a retention period for data that is stored in the hot storage tier and select Automatically Converted to IA. In this case, data is first stored in the hot storage tier and then automatically moved to the IA storage tier after the specified retention period. If you specify a retention period for data that is stored in the IA storage tier and select Automatically Deleted, data that is stored in the IA storage tier is automatically deleted after the specified retention period.

    • You can specify a retention period for data that is stored in the hot storage tier and select Automatically Converted to IA. In this case, data is first stored in the hot storage tier and then automatically moved to the IA storage tier after the specified retention period. If you specify a retention period for data that is stored in the IA storage tier and select Automatically Converted to Archive, data is first stored in the IA storage tier and then automatically moved to the Archive storage tier after the specified retention period.

    • You can specify a retention period for data that is stored in the hot storage tier and select Automatically Converted to Archive. In this case, data is first stored in the hot storage tier and then automatically moved to the Archive storage tier after the specified retention period. If you specify a retention period for data that is stored in the Archive storage tier and select Automatically Deleted, data that is stored in the Archive storage tier is automatically deleted after the specified retention period.

    Important
    • For more information about the hot storage tier, IA storage tier, and Archive storage tier, see Overview of tiered storage.

    • Data in the hot storage tier must be stored for at least 7 days before it can be moved to the IA storage tier and at least 30 days before it can be moved to the Archive storage tier. Data in the IA storage tier must be stored for at least 30 days before it can be moved to the Archive storage tier. For more information, see Lifecycle management for data storage.

    • For more information about the billing of data in the hot storage tier, IA storage tier, and Archive storage tier, see Billable items.

    Shards

    The number of shards. Simple Log Service provides shards that allow you to read and write data. Each shard supports a write capacity of 5 MB/s and 500 writes/s and a read capacity of 10 MB/s and 100 reads/s.

    You can create up to 10 shards in each Eventstore. You can create up to 200 shards in each project. For more information, see Shard.

    Automatic Sharding

    If you turn on Automatic Sharding, Simple Log Service increases the number of shards when the existing shards cannot accommodate the data that is written. For more information, see Manage shards.

    Maximum Shards

    If you turn on Automatic Sharding, you must configure this parameter to specify the maximum number of readwrite shards that can be created. Maximum value: 256.

    Log Public IP

    If you turn on Log Public IP, Simple Log Service adds the following information to the Tag field of the collected logs:

    • __client_ip__: the public IP address of the log source.

    • __receive_time__: the time when Simple Log Service receives the log. The timestamp follows the UNIX time format. It is the number of seconds that have elapsed since 00:00:00 UTC, Thursday, January 1, 1970.

Modify an Eventstore

  1. On the Event Storage > Eventstores tab, move the pointer over the Eventstore that you want to modify and choose 修改日志库.png > Modify.

  2. On the Eventstore Attributes page, click Modify.

    1. Change the data retention period. For more information, see Create an Eventstore.

    2. Manage shards.

      By default, two shards are created in an Eventstore. You can split a shard or merge shards based on your business requirements. For more information, see Manage shards.

  3. Click Save.

Delete an Eventstore

Warning

After you delete an Eventstore, all events in the Eventstore are permanently deleted and cannot be restored. Proceed with caution.

  1. On the Event Storage > Eventstores tab, move the pointer over the Eventstore that you want to delete and choose 修改日志库.png > Delete.

  2. In the message that appears, click OK.

Delete events

After the retention period of events ends, the events are automatically deleted. You can also modify Data Retention Period to delete events.

Important

If you shorten the data retention period, Simple Log Service deletes all expired events within 1 hour. For example, if you change the data retention period from 5 days to 1 day, Simple Log Service deletes the events of the previous four days within 1 hour.

Index description

After you create an Eventstore, Simple Log Service automatically creates indexes for the following fields.

Field

Type

data

json

datacontenttype

text

dataschema

text

id

text

message

text

source

text

specversion

text

status

text

subject

text

time

text

title

text

type

text