This topic describes how to create, modify, and delete a Metricstore in the Log Service console.

Prerequisites

A Log Service project is created. For more information, see Create a project.

Create a Metricstore

  1. Log on to the Log Service console.
  2. In the Projects section, click the name of the project that you want to view.
  3. On the Metricstore Storage > Metricstore tab, click the plus sign (+) next to the search box.
  4. In the Create Metricstore pane, set the following parameters.
    Parameter Description
    MetricStore Name The name of the Metricstore. The name must be unique in the project to which the Metricstore belongs. After the Metricstore is created, the name cannot be modified.
    Data Retention Period The retention period of the time series data that is collected by using Log Service in the Metricstore. Valid values: 15 to 3000. Unit: days. When the retention period expires, the time series data is deleted.
    Shards Log Service provides shards to read and write data. Each shard supports a write speed of 5 MB/s, 500 write operations per second, a read speed of 10 MB/s, and 100 read operations per second. You can create up to 10 shards for each Metricstore. You can create up to 200 shards for each project. For more information, see Shard.
  5. Click Confirm.

Modify the configurations of a Metricstore

  1. On the Metricstore Storage > Metricstore tab, choose Modify a Logstore > Modify next to the Metricstore.
  2. In the upper-right corner of the Metricstore Attribute page, click Modify.
    • Modify the data retention period. For more information, see Create a Metricstore.
    • Manage shards.

      After a Metricstore is created, two shards are automatically created in the Metricstore. You can split, merge, and delete shards based on your business requirements. For more information, see Manage shards.

  3. Click Save.

Delete a Metricstore

Notice
  • Before you can delete a Metricstore, you must delete all Logtail configuration files that are associated with the Metricstore.
  • If data shipping is enabled for the Metricstore, we recommend that you stop writing data to the Metricstore and ensure that all data is shipped to the Metricstore before data is deleted.
  • If you use the Alibaba Cloud account to delete a Metricstore but the system prompts that the account does not have the required permissions,submit a ticket.
  1. On the Metricstore Storage > Metricstore tab, choose Modify a Logstore > Consumption Preview next to the Metricstore.
    Warning After you delete a Metricstore, the time series data in the Metricstore is deleted and cannot be restored.
  2. In the message that appears, click OK.