Available in VPC
Get peer pod (CPU, memory, storage) usage for CA pods in a blockchain network
Request
The following describes the request format for the endpoint. The request format is as follows:
Method | URI |
---|---|
GET | /networks/{networkId}/peers/{peerId}/usage |
Request headers
For headers common to all Blockchain Service APIs, see Common Blockchain Service headers.
Request path parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
networkId |
Long | Required | Network ID
|
peerId |
Long | Required | Peer ID
|
Request query parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
startTime |
Integer | Required | Usage query start time (Unix timestamp)
|
endTime |
Integer | Required | Usage query end time (Unix timestamp)
|
isCouchDb |
Boolean | Optional | CouchDB status
|
Request example
The following is a sample request.
curl --location --request GET 'https://blockchainservice.apigw.ntruss.com/api/v1/networks/{networkId}/peers/{peerId}/usage?startTime=1722297600000&endTime=1722319200000&isCouchDb=false' \
--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
The following describes the response format.
Response body
The following describes the response body.
Field | Type | Required | Description |
---|---|---|---|
networkId |
Long | - | Network ID |
nodeId |
String | - | Peer node ID |
nodeType |
String | - | Peer node type |
containerNo |
Long | - | Ncloud Kubernetes Service container number
|
cpuUsage |
Map | - | CPU usage per hour of event occurrence (unit: vCPU)
|
memUsage |
Map | - | Memory usage per hour of event occurrence (unit: MiB)
|
diskUsage |
Map | - | Storage usage per hour of event occurrence (unit: %)
|
Response status codes
For response status codes common to all Blockchain Service APIs, see Common Blockchain Service response status codes.
Response example
The following is a sample example.
{
"networkId": 1630,
"nodeId": "25738634",
"nodeType": "peer",
"containerNo": 0,
"cpuUsage": {
"1722306600000": 0.0077477186,
"1722308400000": 0.0076888553,
"1722313800000": 0.007819935,
"1722304800000": 0.0071446504,
"1722315600000": 0.008204839,
"1722299400000": 0.0074888305,
"1722317400000": 0.007889176,
"1722301200000": 0.0073726247,
"1722312000000": 0.0076033045,
"1722303000000": 0.0076380465,
"1722310200000": 0.007312449
},
"memUsage": {
"1722306600000": 47,
"1722308400000": 47,
"1722313800000": 48,
"1722304800000": 47,
"1722315600000": 48,
"1722299400000": 47,
"1722317400000": 48,
"1722301200000": 47,
"1722312000000": 47,
"1722303000000": 47,
"1722310200000": 47
},
"diskUsage": {
"1722306600000": 0,
"1722308400000": 0,
"1722313800000": 0,
"1722304800000": 0,
"1722315600000": 0,
"1722299400000": 0,
"1722317400000": 0,
"1722301200000": 0,
"1722312000000": 0,
"1722303000000": 0,
"1722310200000": 0
}
}