Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Metric Management/ Querying Metrics of a Metric Group
Updated on 2025-10-20 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

None

Response Parameters

Table 3 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 4.

Table 4 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

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

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.