Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Metric Management/ Querying Metrics of a Metric Group
Updated on 2026-07-16 GMT+08:00

Querying Metrics of a Metric Group

Function

This API is used to query metrics of a metric group. Before calling this API:

Debugging

You can debug this API in API Explorer.

URI

GET /v3/{project_id}/instances/metric-name

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

group_name

Yes

String

Definition

Metric group name.

Constraints

N/A

Range

  • CPUMEMORY: CPU/memory.
  • IOSTORAGE: I/O storage.
  • NETWORK: network.
  • CONNECTION: connection.
  • TRANSACTION: transaction.
  • LOCK: lock.
  • SYNCSTAT: synchronization status.
  • PROCESSRESOURCE: process resource.

Default Value

N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

After a response is returned, the value of X-Subject-Token in the response header is the token.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Language.

Constraints

N/A

Range

  • zh-cn: Chinese
  • en-us: English

Default Value

en-us

Response Parameters

Table 4 Response body parameters

Parameter

Type

Description

group_name

String

Definition

Metric group name.

Range

N/A

metric_names

Array of MetricNameResult objects

Definition

Metrics in the group. For details, see Table 5.

Table 5 MetricNameResult field data structure description

Parameter

Type

Description

metric

String

Definition

Metric ID.

Range

N/A

name

String

Definition

Metric name.

Range

N/A

Example Request

Querying metrics of a metric group

https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0611f1bd8b00d5d32f17c017f15b599f/instances/metric-name?group_name=CPUMEMORY

Example Response

{ 
  "group_name" : "CPUMEMORY", 
  "metric_names" : [ { 
    "metric" : "rds001_cpu_util", 
"name": "CPU usage"
  }, { 
    "metric" : "rds002_mem_util", 
"name": "memory usage"
  } ] 
}

Status Codes

Error Codes

For details, see Error Codes.