This topic describes how to create, modify, and delete a Logstore in the Log Service console.
Create a Logstore
- Log on to the Log Service console.
- In the Projects section, click the target project.
- Choose +.. Click
- In the Create Logstore dialog box, set the required parameters. The following table describes the parameters.
Parameter Description Logstore Name The name of the Logstore. The name must be unique in the project to which the Logstore belongs. WebTracking If you turn on the WebTracking switch, Log Service can collect log data from web browsers and mobile apps that run on iOS or Android to Log Service. By default, the switch is turned off. Permanent Storage If you turn on this switch, Log Service permanently stores collected logs. By default, the switch is turned off. Data Retention Period You must set Data Retention Period if you do not turn on the Permanent Storage switch.
The retention period of collected log data. Unit: days. Valid values: 1 to 3000. Log data is deleted when the retention period exceeds the specified days.
Shards The number of shards in the Logstore. You can create up to 10 shards for each Logstore. You can create a maximum of 200 shards for each project. Automatic Sharding If you turn on this switch, Log Service automatically increases the number of shards when read and write requests exceed the capacity of the existing shards. The switch is turned on by default. For more information, see Manage a shard. Maximum Shards The maximum number of shards after automatic sharding. This parameter is required if you turn on the Automatic Sharding switch. Maximum value: 64. Log Public IP If you turn on this switch, 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 Log Service receives log data. The time is formatted as a Unix timestamp.
- Click OK.
Modify a Logstore
- Choose . Click the management icon of the target Logstore, and then select .
- On the Logstore Attributes page, click Modify in the upper-right corner.
For more information about the parameters, see Create a Logstore.
- Click Save.
Delete a Logstore
- Before you can delete a Logstore, you must delete all relevant Logtail configurations.
- If LogShipper is enabled for the Logstore, we recommend that you stop writing data to the Logstore before you delete the Logstore. In addition, make sure that all data in the Logstore is shipped.
- If you cannot delete a Logstore by using your Alibaba Cloud account due to insufficent permissions, submit a ticket.
. Click the management icon of the target Logstore, and then select .Warning If a Logstore is deleted, the log data in the Logstore is permanently deleted. Proceed with caution.
- In the dialog box that appears, click OK.