GetServersTop
  • PDF

GetServersTop

  • PDF

Summary

Query the server of the user's server that corresponds to the usage top5 by Cpu, Memory, and File system.

Request

API URL

URL: https://cw.apigw.ntruss.com/cw_fea/real/cw/api/servers/top
Method: POST

Request header

The request headers specified in common settings are required.

x-ncp-apigw-signature-v2: {generated signature}
x-ncp-apigw-timestamp: {current timestamp}
x-ncp-iam-access-key: {your iam access key}

Request Parameters

Parameter Name Requirement status Type Restrictions Description
query Y String The following values are valid under the metric name you want to check.
prod N String classic | vpc
Metric Name Description
avg_cpu_used_rto cpu utilization
mem_usert memory utilization
avg_fs_usert file system utilization

Example

Request example

The following is an example of querying a server corresponding to top5 with cpu utilization (avg_cpu_used_rto)

POST /cw_fea/real/cw/api/servers/top?query=avg_cpu_used_rto
Host: cw.apigw.ntruss.com
x-ncp-apigw-signature-v2: {generated signature}
x-ncp-apigw-timestamp: {current timestamp}
x-ncp-iam-access-key: {your iam access key}

Response example

Information from servers corresponding to HTTP code 200 and top 5 is returned in JSON format if the query is completed without error.

[
    {
        "hostName": "{hostname001}",
        "instanceNo": "{hostname001's instanceNo}",
        "avg_cpu_used_rto": {avg_cpu_used_rto},
        "avg_fs_usert": {avg_fs_usert},
        "mem_usert": {mem_usert}
    },
    {
        "hostName": "{hostname002}",
        "instanceNo": "{hostname002's instanceNo}",
        "avg_cpu_used_rto": {avg_cpu_used_rto},
        "avg_fs_usert": {avg_fs_usert},
        "mem_usert": {mem_usert}
    },
    {
        "hostName": "{hostname003}",
        "instanceNo": "{hostname003's instanceNo}",
        "avg_cpu_used_rto": {avg_cpu_used_rto},
        "avg_fs_usert": {avg_fs_usert},
        "mem_usert": {mem_usert}
    },
    {
        "hostName": "{hostname004}",
        "instanceNo": "{hostname004's instanceNo}",
        "avg_cpu_used_rto": {avg_cpu_used_rto},
        "avg_fs_usert": {avg_fs_usert},
        "mem_usert": {mem_usert}
    },
    {
        "hostName": "{hostname005}",
        "instanceNo": "{hostname005's instanceNo}",
        "avg_cpu_used_rto": {avg_cpu_used_rto},
        "avg_fs_usert": {avg_fs_usert},
        "mem_usert": {mem_usert}
    }
]

Was this article helpful?

What's Next