This topic describes how to create, modify, and delete a Metricstore in the Simple Log Service console. This topic also describes how to delete metrics. Before you can delete a Metricstore, you must delete all related Logtail configurations. If you want to delete metrics, you can reduce the retention period for the metrics.
A Metricstore is used to collect, store, and query metrics in Simple Log Service. Each Metricstore belongs to a project. You can create multiple Metricstores in a project. For more information, see Metricstore.
A project is created. For more information, see Create a project.
Create a Metricstore
Log on to the Simple Log Service console.
In the Projects section, click the project that you want to manage.
On thetab, click the + icon.
In the Create Metricstore panel, configure the following parameters and click OK.
The name of the Metricstore. The name must be unique in the project to which the Metricstore belongs. After the Metricstore is created, you cannot change the name of the Metricstore.
Data Retention Period
The retention period of the collected metrics in the Metricstore.
If you select Specified Days for Data Retention Period, you can specify how many days you want to store metrics based on your business requirements. Valid values: 1 to 3000. Unit: days.Warning
After the retention period ends, metrics are automatically deleted.
If you shorten the data retention period, Simple Log Service deletes all expired metrics within 1 hour. The data volume that is displayed for Usage Details on the homepage of the Simple Log Service console is updated the next day. For example, if you change the data retention period from 5 days to 1 day, Simple Log Service deletes the metrics of the previous four days within 1 hour.
If you select Permanent Storage for Data Retention Period, Simple Log Service permanently stores the collected metrics in the Metricstore.Note
If you query the data retention period by calling an SDK and the returned result is 3650, metrics are permanently stored.
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 Metricstore. You can create up to 200 shards in each project. For more information, see Shard.
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.
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.
Modify the configurations of a Metricstore
On thetab, move the pointer over the Metricstore whose configurations you want to modify and choose .
On the Metricstore Attribute page, click Modify.
Delete a Metricstore
Before you can delete a Metricstore, you must delete all Logtail configurations that are associated with the Metricstore. For more information, see Delete a Logtail configuration.
If the data shipping feature is enabled for the Metricstore, we recommend that you stop writing data to the Metricstore and make sure that all data in the Metricstore is shipped before you delete the Metricstore.
If you delete all Metricstores, you are still charged for data storage on the day that you delete the Metricstores, but you are no longer charged from the following day. As a result, from the third day after you delete all Metricstores, you no longer receive a Simple Log Service bill.
On thetab, move the pointer over the Metricstore that you want to delete and choose .Warning
After you delete a Metricstore, all metrics in the Metricstore are deleted and cannot be restored. Proceed with caution.
In the message that appears, click OK.
After the retention period of metrics ends, the metrics are automatically deleted. You can also modify Data Retention Period to delete metrics.