SearchMetricList
    • PDF

    SearchMetricList

    • PDF

    Article summary

    Summary

    This API queries an available metric list from a monitored target group.

    Request

    API URL

    URL: https://cw.apigw.ntruss.com/cw_fea/real/cw​/api​/rule​/group​/metric​/search
    Method: POST 
    

    Request header

    The request headers specified in common settings are required.

    Content-Type: application/json
    x-ncp-apigw-signature-v2: {generated signature}
    x-ncp-apigw-timestamp: {current timestamp}
    x-ncp-iam-access-key: {your iam access key}
    

    Request Body

    MetricListRequest

    Example

    Request example

    The following code shows an example of querying the metric data with the following search condition of the product with cw_key "xxxxxxxxxxxxxxxxxx":

    • dimValues: The dimension name is "type" and its value is "cpu"

    • query: Metric data containing the string "used"

    • dimensionsSelectedList: When the value of dimension "cpu_idx is "0" or "1"

    POST /cw_fea/real/cw/api/rule/group/metric/search
    Host: cw.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-signature-v2: {generated signature}
    x-ncp-apigw-timestamp: {current timestamp}
    x-ncp-iam-access-key: {your iam access key}
    
    Payload:
    {
        "dimValues": [
            {
                "name": "type",
                "value": "cpu"
            }
        ],
        "query": "used",
        "dimensionsSelectedList": [
          {
            "name": "cpu_idx",
            "values": [
              "0",
              "1"
            ]
          }
        ],
        "prodKey": "xxxxxxxxxxxxxxxxxx"
    }
    
    

    Response example

    {
      "metrics": [
        {
          "desc": "user 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": "xxxxxxxxxxxxxxxxxx",
          "unit": "%"
        },
        {
          "desc": "user 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": "xxxxxxxxxxxxxxxxxx",
          "unit": "%"
        }
      ],
      "prodKey": "xxxxxxxxxxxxxxxxxx"
    }
    

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.