Server
    • PDF

    Server

    • PDF

    Article summary

    Available in Classic and VPC

    Get the list of server instances (VMs) in the VPC environment and check the status of the log collection settings through the Cloud Log Analytics service for each server.

    Request

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

    MethodURI
    GET/api/{regionCode}-v1/vpc/servers

    Request headers

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

    Request path parameters

    You can use the following path parameters with your request:

    FieldTypeRequiredDescription
    regionCodeStringRequiredRegion code
    • kr | sgn | jpn
      • kr: Korea Region
      • sgn: Singapore Region
      • jpn: Japan Region

    Request query parameters

    You can use the following path parameters with your request:

    FieldTypeRequiredDescription
    pageNoIntegerOptionalPage number
    • 1 - 100 (default: 1)
    pageSizeIntegerOptionalNumber of items per page
    • 20 - 100 (default: 20)

    Request example

    The request example is as follows:

    curl --location --request GET 'https://cloudloganalytics.apigw.ntruss.com/api/{regionCode}-v1/vpc/servers' \
    --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' \
    

    Response

    This section describes the response format.

    Response body

    The response body includes the following data:

    FieldTypeRequiredDescription
    codeInteger-Response code
    messageString-Response message
    resultObject-Response result
    result.pageSizeInteger-Number of items per page
    result.currentPageInteger-Current page number
    result.totalPageInteger-Total number of pages
    result.totalCountInteger-Total item count
    result.isPagedBoolean-Whether to page
    • true | false
      • true: paged
      • false: not paged
    result.vpcServerInfosArray-Server list
    • Server information
    • Log collection settings information
    result.collectingCountInteger-Number of servers whose collection settings are complete

    vpcServerInfos

    The following describes vpcServerInfos.

    FieldTypeRequiredDescription
    additionalParameterMapObject-Server information
    collectingInfoObject-Log collection settings information
    collectingInfo.collectorAgentVersionString-Log collection agent version
    collectingInfo.logTypeCountInteger-Number of log types to be collected
    collectingInfo.collectionStatusString-Log collection status
    collectingInfo.settingStatusString-Log collection settings status
    collectingInfo.settingStatusColorString-Log collection settings status color display value
    collectingInfo.servernameString-Name of server to collect logs from
    collectingInfo.logCollectorDateString-Log collection settings date and time
    collectingInfo.logTypeListString-List of log types to be collected
    collectingInfo.configKeyString-Log collection agent install key
    collectingInfo.isCollectingBoolean-Whether log collection is enabled
    • true | false
      • true: enabled
      • false: disabled
    Note

    For more information about the fields related to server information (additionalParameterMap), see the Server API Guide and Server User Guide.

    Response status codes

    For response status codes common to all Cloud Log Analytics APIs, see Cloud Log Analytics response status codes.

    Response example

    The response example is as follows:

    {
        "code": 0,
        "message": "The request has been successfully processed.",
        "result": {
            "pageSize": 10,
            "currentPage": 1,
            "totalPage": 1,
            "totalCount": 2,
            "isPaged": true,
            "vpcServerInfos": [
                {
                    "additionalParameterMap": {
                        "networkInterfaceList": [
                            {
                                "vpcNo": 77778,
                                "vpcName": "test",
                                "subnetNo": 177781,
                                "subnetName": "mgmt-subnet",
                                "subnet": "***.***.***.***/**",
                                "igwYn": "Y",
                                "zoneNo": 2,
                                "zoneName": "KR-1",
                                "networkInterfaceNo": 4352109,
                                "networkInterfaceName": "nic-4352109",
                                "internalIp": "***.***.***.***",
                                "macAddress": "**:**:**:**:**:**",
                                "attachedDeviceName": "eth0",
                                "secondaryIps": [
                                    null
                                ]
                            }
                        ],
                        "igwYn": "Y",
                        "vpcName": "test",
                        "vpcNo": 77778,
                        "subnetName": "mgmt-subnet",
                        "subnetNo": 177781
                    },
                    "baseBlockStorageSize": null,
                    "carrierNetworkIp": "***.***.***.***",
                    "computeInstanceDetailTypeCode": null,
                    "computeInstanceName": "s19293f45ef5",
                    "computeInstanceTypeCode": "VSVR",
                    "computeInstanceUuid": null,
                    "computeSpec": "vCPU 2EA, Memory 8GB, Disk 50GB",
                    "contractNo": 17792786,
                    "cpuCount": 2,
                    "createYmdt": 1729059121967,
                    "hostNameInitConfigYn": null,
                    "instanceNo": 27057139,
                    "instanceProductType2Code": "STAND",
                    "instanceStatusCode": "RUN",
                    "instanceStatusName": "running",
                    "instanceTypeCode": "VSVR",
                    "ip": null,
                    "launchDateTime": 1729059320699,
                    "macAddress": null,
                    "nsiName": "centos-7.3-64",
                    "operationCode": "NULL",
                    "operationYmdt": "1729059320699",
                    "osDiskTypeCode": "NET",
                    "osDiskTypeDetailCode": "HDD",
                    "osInformation": "CentOS 7.3 (64-bit)",
                    "osName": "CentOS 7.3 (64-bit)",
                    "overlayNetworkIp": "172.16.1.7",
                    "parameters": null,
                    "platformTypeCode": "LNX64",
                    "productCode": "SVR.VSVR.STAND.C002.M008.NET.HDD.B050.G002",
                    "publicIp": null,
                    "publicIpInstanceNo": null,
                    "regionCode": "KR",
                    "regionName": "Korea",
                    "serverName": "s19293f45ef5",
                    "serverSpec": "vCPU 2EA, Memory 8GB, Disk 50GB",
                    "softwareProductCode": "SW.VSVR.OS.LNX64.CNTOS.0703.B050",
                    "subnetName": null,
                    "subAccountNo": null,
                    "upTime": null,
                    "vpcName": null,
                    "zoneName": "KR-1",
                    "zoneNo": 2,
                    "serverStatusColor": "green",
                    "serverStatusKorean": "In operation",
                    "serverStatusValue": "In operation",
                    "isSupportOS": true,
                    "collectingInfo": {
                        "collectorAgentVersion": "7.17.2",
                        "logTypeCount": 5,
                        "collectionStatus": "Not set",
                        "settingStatus": "On",
                        "settingStatusColor": "green",
                        "servername": "s19293f45ef5",
                        "logCollectorDate": "2024-11-08 22:30:57",
                        "logTypeList": "tomcat_catalina,SYSLOG,security_log,apache_access,apache_error",
                        "configKey": "***********",
                        "isCollecting": true
                    }
                },
                {
                    "additionalParameterMap": {
                        "networkInterfaceList": [
                            {
                                "vpcNo": 77778,
                                "vpcName": "test",
                                "subnetNo": 177781,
                                "subnetName": "mgmt-subnet",
                                "subnet": "***.***.***.***/**",
                                "igwYn": "Y",
                                "zoneNo": 2,
                                "zoneName": "KR-1",
                                "networkInterfaceNo": 4352038,
                                "networkInterfaceName": "nic-4352038",
                                "internalIp": "***.***.***.***",
                                "macAddress": "**:**:**:**:**:**",
                                "attachedDeviceName": "eth0",
                                "secondaryIps": [
                                    null
                                ]
                            }
                        ],
                        "igwYn": "Y",
                        "vpcName": "test",
                        "vpcNo": 77778,
                        "subnetName": "mgmt-subnet",
                        "subnetNo": 177781
                    },
                    "baseBlockStorageSize": null,
                    "carrierNetworkIp": "***.***.***.***",
                    "computeInstanceDetailTypeCode": null,
                    "computeInstanceName": "s19293c276d5",
                    "computeInstanceTypeCode": "VSVR",
                    "computeInstanceUuid": null,
                    "computeSpec": "vCPU 2EA, Memory 8GB, [SSD]Disk 50GB",
                    "contractNo": 17792417,
                    "cpuCount": 2,
                    "createYmdt": 1729055851701,
                    "hostNameInitConfigYn": null,
                    "instanceNo": 27056413,
                    "instanceProductType2Code": "STAND",
                    "instanceStatusCode": "RUN",
                    "instanceStatusName": "running",
                    "instanceTypeCode": "VSVR",
                    "ip": null,
                    "launchDateTime": 1729056060600,
                    "macAddress": null,
                    "nsiName": "centos-7.3-64",
                    "operationCode": "NULL",
                    "operationYmdt": "1729056060600",
                    "osDiskTypeCode": "NET",
                    "osDiskTypeDetailCode": "SSD",
                    "osInformation": "CentOS 7.3 (64-bit)",
                    "osName": "CentOS 7.3 (64-bit)",
                    "overlayNetworkIp": "172.16.1.6",
                    "parameters": null,
                    "platformTypeCode": "LNX64",
                    "productCode": "SVR.VSVR.STAND.C002.M008.NET.SSD.B050.G002",
                    "publicIp": null,
                    "publicIpInstanceNo": null,
                    "regionCode": "KR",
                    "regionName": "Korea",
                    "serverName": "s19293c276d5",
                    "serverSpec": "vCPU 2EA, Memory 8GB, [SSD]Disk 50GB",
                    "softwareProductCode": "SW.VSVR.OS.LNX64.CNTOS.0703.B050",
                    "subnetName": null,
                    "subAccountNo": null,
                    "upTime": null,
                    "vpcName": null,
                    "zoneName": "KR-1",
                    "zoneNo": 2,
                    "serverStatusColor": "green",
                    "serverStatusKorean": "In operation",
                    "serverStatusValue": "In operation",
                    "isSupportOS": true,
                    "collectingInfo": {
                        "collectorAgentVersion": "7.17.2",
                        "logTypeCount": 8,
                        "collectionStatus": "Not set",
                        "settingStatus": "On",
                        "settingStatusColor": "green",
                        "servername": "s19293c276d5",
                        "logCollectorDate": "2024-11-17 23:27:09",
                        "logTypeList": "apache_access,apache_error,cdb_mysql_audit,mysql_error,mysql_slow,security_log,SYSLOG,tomcat_catalina",
                        "configKey": "***********",
                        "isCollecting": true
                    }
                }
            ],
            "collectingCount": 0
        }
    }
    

    Was this article helpful?

    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.