All Products
Search
Document Center

Simple Log Service:GetMetricStore

Last Updated:Sep 18, 2025

Queries a Metricstore.

Operation description

A Metricstore is used to store metrics. This operation queries only the configuration of a Metricstore. To query the metrics in a Metricstore, see Query and analyze data and GetLogsV2.

  • Specify an existing Metricstore.

  • The Host in the request syntax consists of a project name and a Simple Log Service endpoint. Specify the project in the Host.

  • Create an AccessKey pair. For more information, see AccessKey pair.

An Alibaba Cloud account AccessKey has full access permissions to all API operations. This poses a high security threat. We recommend that you create and use a RAM user for API access or routine O&M. The RAM user must be granted the required permissions to operate Simple Log Service resources. For more information, see Create a RAM user and grant permissions.

  • Obtain the name and region of the project to which the logs belong. For more information, see Manage projects.

  • You can create a maximum of 200 Logstores or Metricstores in a project.

  • Metrics are deleted after their retention period expires.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET /metricstores/{name} HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

name

string

Yes

The name of the Metricstore.

my_metric_store

Response elements

Element

Type

Description

Example

headers

object

Server

string

nginx

Content-Type

string

application/json

Content-Length

string

0

Connection

string

close

Date

string

Sun, 27 May 2018 08:25:04 GMT

x-log-requestid

string

5B0A6B60BB6EE39764D458B5

object

The response body.

name

string

The name of the Metricstore.

my_metric_store

ttl

integer

The retention period of data. Unit: days.

7

shardCount

integer

The number of shards.

2

autoSplit

boolean

Indicates whether automatic sharding is enabled.

true

maxSplitShard

integer

The maximum number of shards that can be generated by automatic sharding.

64

mode

string

The type of the Metricstore. Example: standard.

standard

metricType

string

The metric type of the Metricstore. Example: prometheus.

prometheus

createTime

integer

The time when the Metricstore was created. The value is a UNIX timestamp.

1698933894

lastModifyTime

integer

The time when the Metricstore was last modified. The value is a UNIX timestamp.

1712023974

hot_ttl

integer

The retention period of data in the hot storage layer. Unit: days.

infrequentAccessTTL

integer

The retention period for the IA storage class. Unit: days.

Examples

Success response

JSON format

{ "name": "my_metric_store", "ttl": 7, "shardCount": 2, "autoSplit": true, "maxSplitShard": 64, "mode": "standard", "metricType": "prometheus", "createTime": 1698933894, "lastModifyTime": 1712023974, "hot_ttl": 0, "infrequentAccessTTL": 0 }

Error codes

HTTP status code

Error code

Error message

Description

404 MetricStoreNotExist The specified metricstore xxx does not exist. The specified metricstore xxx does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.