GetServersTop
- Print
- PDF
GetServersTop
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Among your servers, search for the servers that correspond to the top 5 usage by CPU, memory, and file system.
Requests
API URL
URL: https://cw.apigw.ntruss.com/cw_fea/real/cw/api/servers/top
Method: POST
Request headers
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 to be searched | |
prod | N | String | classic | vpc | Default: vpc |
metric name | Description |
---|---|
avg_cpu_used_rto | CPU usage rate |
mem_usert | Memory usage rate |
avg_fs_usert | File system usage rate |
Examples
Request examples
The following is an example of searching the servers corresponding to the top 5 by CPU usage rate (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 examples
If the search is completed without an error, information from the server corresponding to HTTP code 200 and Top 5 is returned in JSON format.
[
{
"avg_cpu_user_rto": "{avg_cpu_user_rto}",
"hostName": "{hostname001}",
"instanceNo": "{hostname001's instanceNo}",
"avg_cpu_used_rto": {avg_cpu_used_rto},
"avg_fs_usert": {avg_fs_usert},
"mem_usert": {mem_usert}
},
{
"avg_cpu_user_rto": "{avg_cpu_user_rto}",
"hostName": "{hostname002}",
"instanceNo": "{hostname002's instanceNo}",
"avg_cpu_used_rto": {avg_cpu_used_rto},
"avg_fs_usert": {avg_fs_usert},
"mem_usert": {mem_usert}
},
{
"avg_cpu_user_rto": "{avg_cpu_user_rto}",
"hostName": "{hostname003}",
"instanceNo": "{hostname003's instanceNo}",
"avg_cpu_used_rto": {avg_cpu_used_rto},
"avg_fs_usert": {avg_fs_usert},
"mem_usert": {mem_usert}
},
{
"avg_cpu_user_rto": "{avg_cpu_user_rto}",
"hostName": "{hostname004}",
"instanceNo": "{hostname004's instanceNo}",
"avg_cpu_used_rto": {avg_cpu_used_rto},
"avg_fs_usert": {avg_fs_usert},
"mem_usert": {mem_usert}
},
{
"avg_cpu_user_rto": "{avg_cpu_user_rto}",
"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?