SearchMetricList

Prev Next

Available in Classic and VPC

Get the list of metrics for a monitoring target group.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /cw_fea/real/cw​/api​/rule​/group​/metric​/search

Request headers

For information about the headers common to all Cloud Insight APIs, see Cloud Insight request headers.

Request body

See MetricListRequest for more information about the fields related to metric information.

Request example

The request example is as follows:

curl --location --request POST 'https://cw.apigw.ntruss.com/cw_fea/real/cw​/api​/rule​/group​/metric​/search' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json' \
--data '{
    "dimValues": [
        {
            "name": "type",
            "value": "cpu"
        }
    ],
    "query": "used",
    "dimensionsSelectedList": [
      {
        "name": "cpu_idx",
        "values": [
          "0",
          "1"
        ]
      }
    ],
    "prodKey": "**********"
}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
metrics Array - Metric list
prodKey String Required Product key (cw_key)

metrics

The following describes metrics.

Field Type Required Description
dataType String - Data type
desc String - Metric description
dimensions Array - Dimension list
idDimension String - Dimension name
metric String - Metric name
options Object - Aggregation method
  • Displayed in the form of "Aggregation cycle": [Aggregation function]
    • Aggregation cycle: Min1 | Min5 | Min30 | Hour2 | Day1
    • Aggregation function: COUNT | SUM | MAX | MIN | AVG
prodKey String Required Product key (cw_key)
unit String - Unit

dimensions

The following describes dimensions.

Field Type Required Description
dim String - Dimension name
val String - Dimension value

Response status codes

For information about the HTTP status codes common to NAVER Cloud Platform, see Cloud Insight API response status codes.

Response example

The response example is as follows:

{
  "metrics": [
    {
      "dataType": "FLOAT",
      "desc": "used ratio",
      "dimensions": [
        {
          "dim": "type",
          "val": "cpu"
        },
        {
          "dim": "cpu_idx",
          "val": "0"
        }
      ],
      "idDimension": "instanceNo",
      "metric": "used_rto",
      "options": {
        "Min1": [
          "COUNT",
          "SUM",
          "MAX",
          "MIN",
          "AVG"
        ],
        "Min5": [
          "COUNT",
          "SUM",
          "MAX",
          "MIN",
          "AVG"
        ],
        "Min30": [
          "COUNT",
          "SUM",
          "MAX",
          "MIN",
          "AVG"
        ],
        "Hour2": [
          "COUNT",
          "SUM",
          "MAX",
          "MIN",
          "AVG"
        ],
        "Day1": [
          "COUNT",
          "SUM",
          "MAX",
          "MIN",
          "AVG"
        ]
      },
      "prodKey": "**********",
      "unit": "%"
    },
    {
      "dataType": "FLOAT",
      "desc": "used ratio",
      "dimensions": [
        {
          "dim": "type",
          "val": "cpu"
        },
        {
          "dim": "cpu_idx",
          "val": "1"
        }
      ],
      "idDimension": "instanceNo",
      "metric": "used_rto",
      "options": {
        "Min1": [
          "COUNT",
          "SUM",
          "MAX",
          "MIN",
          "AVG"
        ],
        "Min5": [
          "COUNT",
          "SUM",
          "MAX",
          "MIN",
          "AVG"
        ],
        "Min30": [
          "COUNT",
          "SUM",
          "MAX",
          "MIN",
          "AVG"
        ],
        "Hour2": [
          "COUNT",
          "SUM",
          "MAX",
          "MIN",
          "AVG"
        ],
        "Day1": [
          "COUNT",
          "SUM",
          "MAX",
          "MIN",
          "AVG"
        ]
      },
      "prodKey": "**********",
      "unit": "%"
    }
  ],
  "prodKey": "**********"
}