This topic describes how to create, modify, and delete a Metricstore in the Log Service console.
Create a Metricstore
- Log on to the Log Service console.
- In the Projects section, click the project where you want to create a Metricstore.
- On the +) next to the search box. tab, click the plus sign (
- 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. Permanent Storage Specifies whether to enable permanent storage. If you enable this feature, Log Service permanently stores the collected time series data. By default, this feature is disabled. Data Retention Period The retention period of the time series data. If you turn off the Permanent Storage switch, you must set the Data Retention Period parameter.
Valid values: 1 to 3000. Unit: days. When the retention period expires, the time series data is deleted.
- Click OK.
Modify the configurations of a Metricstore
- On the tab, choose next to the Metricstore.
- 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 as needed. The procedures to manage shards in a Metricstore are the same as the procedures to manage shards in a Logstore. For more information, see Manage shards.
- Click Save.
Delete a Metricstore
- 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 has been shipped to the Metricstore before deletion.
- 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.
- On the
tab, choose next to the Metricstore.Warning After you delete a Metricstore, the time series data in the Metricstore is deleted and cannot be restored.
- In the message that appears, click OK.