GetServersTop
    • PDF

    GetServersTop

    • PDF

    Article summary

    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 nameRequirement statusTypeRestrictionsDescription
    queryYStringThe following values are valid under the metric name to be searched
    prodNStringclassic | vpcDefault: vpc
    metric nameDescription
    avg_cpu_used_rtoCPU usage rate
    mem_usertMemory usage rate
    avg_fs_usertFile 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?

    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.