- Print
- PDF
Server
- Print
- PDF
Available in Classic and VPC
Get the list of server instances (VMs) in the Classic 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:
Method | URI |
---|---|
GET | /api/{regionCode}-v1/classic/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:
Field | Type | Required | Description |
---|---|---|---|
regionCode | String | Required | Region code
|
Request query parameters
You can use the following path parameters with your request:
Field | Type | Required | Description |
---|---|---|---|
pageNo | Integer | Optional | Page number
|
pageSize | Integer | Optional | Number of items per page
|
Request example
The request example is as follows:
curl --location --request GET 'https://cloudloganalytics.apigw.ntruss.com/api/{regionCode}-v1/classic/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:
Field | Type | Required | Description |
---|---|---|---|
code | Integer | - | Response status codes |
message | String | - | Response status message |
result | Object | - | Response result |
result.pageSize | Integer | - | Number of items per page |
result.currentPage | Integer | - | Current page number |
result.totalPage | Integer | - | Total number of pages |
result.totalCount | Integer | - | Total item count |
result.isPaged | Boolean | - | Whether to page
|
result.serverInfos | Array | - | Server list
|
result.collectingCount | Integer | - | Number of servers whose collection settings are complete |
serverInfos
The following describes serverInfos
.
Field | Type | Required | Description |
---|---|---|---|
collectingInfo | Object | - | Log collection settings information |
collectingInfo.collectorAgentVersion | String | - | Log collection agent version |
collectingInfo.logTypeCount | Integer | - | Number of log types to be collected |
collectingInfo.collectionStatus | String | - | Log collection status |
collectingInfo.settingStatus | String | - | Log collection settings status |
collectingInfo.settingStatusColor | String | - | Log collection settings status color display value |
collectingInfo.servername | String | - | Name of server to collect logs from |
collectingInfo.logCollectorDate | String | - | Log collection settings date and time |
collectingInfo.logTypeList | String | - | List of log types to be collected |
collectingInfo.configKey | String | - | Log collection agent install key |
collectingInfo.isCollecting | Boolean | - | Whether log collection is enabled
|
For more information about the fields related to server information, 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": 1,
"isPaged": true,
"serverInfos": [
{
"servername": "s1933b2316e4",
"publicIp": null,
"osName": "CentOS 7.3 (64-bit)",
"createYmdt": 1731863979871,
"privateIp": "***.***.***.***",
"serverStatusCode": "INIT",
"serverStatusName": "CREATING",
"serverStatusKorean": "Creating",
"serverStatusValue": "Creating",
"serverStatusColor": "yellow",
"serverImageName": "centos-7.3-64",
"uptime": 1731863979810,
"message": null,
"occuredTime": null,
"logType": null,
"zoneNo": "3",
"zoneName": "KR-2",
"secureZoneNo": null,
"platformTypeCode": "LNX64",
"platformDetailTypeCode": "-",
"cpuCount": 2,
"osDiskType2Code": "NET",
"virtualNetworkInterfaceIp": null,
"portForwardingIp": "***.***.***.***",
"virtualNetworkDomainNo": "3",
"hostName": test,
"gpuCount": null,
"softwareProductCode": "SPSW0LINUX000046",
"virtualNetworkDomainName": "KR2D0003",
"virtualNetworkInterfaceNo": null,
"internalDnsHostName": null,
"regionName": "Korea",
"serverInstanceDetailTypeCode": null,
"operationCode": "CREAT",
"macAddr": "**:**:**:**:**:**",
"alisRaidTypeName": null,
"networkMonitoringYn": null,
"lastServerStateSyncYmdt": null,
"instanceProductType2Code": "STAND",
"accessControlGroupList": [],
"lastLbServerStatusSyncYmdt": null,
"objectMonitoringInstanceNo": null,
"secureZoneName": null,
"loginKeyName": "HJJJ",
"publicIpInstanceNo": null,
"serverInstanceTypeCode": "SVR",
"instanceNo": 27231808,
"portForwardingIpBackboneCode": "PUBLC",
"osDiskType2DetailCode": "SSD",
"feeChargingMonitoringYn": "N",
"regionCode": "KR",
"internalPort": null,
"productCode": "SPSVRSSD00000003",
"memorySize": {
"json.expansion@key": "json.bigdecimal",
"json.expansion@value": "4294967296"
},
"instanceDesc": "",
"regionNo": "1",
"isSsdStorageAddable": true,
"externalPort": null,
"baseBlockStorageSize": {
"json.expansion@key": "json.bigdecimal",
"json.expansion@value": "53687091200"
},
"backboneCode": "PUBLC",
"isSupportOS": false,
"collectingInfo": {
"collectorAgentVersion": 5.5.1,
"logTypeCount": 3,
"collectionStatus": "Not set",
"settingStatus": "On",
"settingStatusColor": "green",
"servername": test,
"logCollectorDate": 2024-11-11 13:11:17,
"logTypeList": apache_error,apache_access,wineventlog,
"configKey": "***********",
"isCollecting": true
}
}
],
"collectingCount": 1
}
}