VPC 환경에서 이용 가능합니다.
설명
서버의 OS Monitoring 데이터를 조회합니다.
요청
요청 URL
POST https://clouddatastreamingservice.apigw.gov-ntruss.com/api/v1/monitoring/getOsMonitoringData/{service-group-instance-no} [수도권]
POST https://clouddatastreamingservice.apigw.gov-ntruss.com/api/krs-v1/monitoring/getOsMonitoringData/{service-group-instance-no} [남부권]
요청 헤더
헤더명
설명
x-ncp-apigw-timestamp
1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간을 밀리초(Millisecond)로 나타내며 API Gateway 서버와 시간 차가 5분 이상 나는 경우 유효하지 않은 요청으로 간주x-ncp-apigw-timestamp:{Timestamp}
x-ncp-iam-access-key
네이버 클라우드 플랫폼 포털에서 발급받은 Access Key ID 값x-ncp-iam-access-key:{Account Access Key}
x-ncp-apigw-signature-v2
Access Key ID 값과 Secret Key로 암호화한 서명x-ncp-apigw-signature-v2:{API Gateway Signature}
Content-Type
Request body content type을 application/json으로 지정Content-Type: application/json
요청 파라미터
파라미터
타입
필수 여부
설명
serviceGroupInstanceNo
String
Y
조회할 Cluster의 번호
timeStart
Long
Y
조회 시작 시간(Millisecond)
timeEnd
Long
Y
조회 종료 시간(Millisecond)
metric
String
Y
조회하려는 metric 명
computeInstanceNo
String
Y
조회할 서버의 Compute Instance No
interval
String
N
집계 주기(default: Min1)
Metric
Description
OS_ALL_METRICS
OS 모든 Metric(Cloud Data Streaming Serivce의 모니터링 페이지에 있는 항목들)
Metric
Description
Min1
1분 간격으로 조회(최대 1일)
Min5
5분 간격으로 조회(최대 1주일)
Min30
30분 간격으로 조회(최대 1개월)
Hour2
2시간 간격으로 조회(최대 3개월)
Day1
1일 간격으로 조회(최대 1년)
요청 예시
POST https://clouddatastreamingservice.apigw.gov-ntruss.com/api/v1/monitoring/getOsMonitoringData/1773271
HOST: clouddatastreamingservice.apigw.gov-ntruss.com
Content-Type: application/json
x-ncp-apigw-signature-v2: zq0FrtlU8JZJi9esTK31bCQUNG3H+jo4CMjMkJDoWSc=
x-ncp-apigw-timestamp: 1593848345548
x-ncp-iam-access-key: 7fIvgFY428mtY6sY8maw
{
"timeEnd": "1626240000000",
"timeStart": "1626239850000",
"metric": "OS_ALL_METRICS",
"computeInstanceNo": "1773272",
"interval" : "Min1"
}
curl -X POST "https://clouddatastreamingservice.apigw.gov-ntruss.com/api/v1/monitoring/getOsMonitoringData/1773271 \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "x-ncp-iam-access-key: 7fIvgFY428mtY6sY8maw" \
-H "x-ncp-apigw-timestamp: 1601971222179" \
-H "x-ncp-apigw-signature-v2: zrCelnR48AADdK/uh6Xe3yy468i8KpQoewYHUmeqYh4=" \
-d \
'{
"timeEnd": "1626240000000",
"timeStart": "1626239850000",
"metric": "OS_ALL_METRICS",
"computeInstanceNo": "1773272",
"interval" : "Min1"
}'
응답 파라미터
public class QueryDataResponseVo {
List<MetricInfoResponseVo> data;
}
public class MetricInfoResponseVo{
List<ArrayList<Object>> dps;
String aggregation;
DimensionsVo dimensions;
String interval;
String metric;
String graphName;
String productName;
}
public class DimensionsVo {
String instanceNo;
}
필드
파라미터명
타입
설명
data
List
Monitoring 데이터 정보
dps
List<ArrayList>
모니터링 정보(timestamp, data 형태)
aggregation
String
조회하는 데이터의 집계함수
dimensions
DimensionsVo
조회하는 데이터의 구분자
interval
String
조회하는 데이터의 집계주기
metric
String
조회하는 Metric 명
graphName
String
그래프 이름
productName
String
상품 이름
instanceNo
String
조회하는 서버의 Compute Instance No
응답 예시
{
"code": 0,
"message": "SUCCESS",
"result": {
"data": [
{
"dps": [
[
1626239880000,
0.00602
],
[
1626239940000,
0.00602
],
[
1626240000000,
0.00602
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "wait i/o",
"graphName": "CPU Usage(%)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
0.22452
],
[
1626239940000,
0.22452
],
[
1626240000000,
0.22453
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "user",
"graphName": "CPU Usage(%)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
0.32506
],
[
1626239940000,
0.32506
],
[
1626240000000,
0.32507
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "total",
"graphName": "CPU Usage(%)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
0.09452
],
[
1626239940000,
0.09452
],
[
1626240000000,
0.09452
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "kernel",
"graphName": "CPU Usage(%)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
0.05
],
[
1626239940000,
0.05
],
[
1626240000000,
0.05
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "load_15",
"graphName": "Load Average",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
0.01
],
[
1626239940000,
0.01
],
[
1626240000000,
0.01
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "load_5",
"graphName": "Load Average",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
0
],
[
1626239940000,
0
],
[
1626240000000,
0
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "load_1",
"graphName": "Load Average",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
30.26428
],
[
1626239940000,
30.26428
],
[
1626240000000,
30.23586
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "usage",
"graphName": "Memory Usage(%)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
0
],
[
1626239940000,
0
],
[
1626240000000,
0
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "swap_mem",
"graphName": "Swap(%)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
2.64788
],
[
1626239940000,
2.64788
],
[
1626240000000,
2.64788
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "used",
"graphName": "Disk Used(GB)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
0.0001
],
[
1626239940000,
0.0001
],
[
1626240000000,
0.0001
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "read",
"graphName": "Disk I/O(MB / sec)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
0.00264
],
[
1626239940000,
0.0016
],
[
1626240000000,
0.00183
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "write",
"graphName": "Disk I/O(MB / sec)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
0.1672
],
[
1626239940000,
0.16878
],
[
1626240000000,
0.16762
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "send",
"graphName": "Network I/O(MB / sec)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
0.10795
],
[
1626239940000,
0.10829
],
[
1626240000000,
0.10651
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "receive",
"graphName": "Network I/O(MB / sec)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
1.98535
],
[
1626239940000,
1.98535
],
[
1626240000000,
1.98633
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "free",
"graphName": "Free Memory(GB)",
"productName": "Cloud Data Streaming Service(VPC)"
},
{
"dps": [
[
1626239880000,
46.32722
],
[
1626239940000,
46.32722
],
[
1626240000000,
46.32722
]
],
"aggregation": "AVG",
"dimensions": {
"instanceNo": "1773272"
},
"interval": "Min1",
"metric": "free",
"graphName": "Free Storage Space(GB)",
"productName": "Cloud Data Streaming Service(VPC)"
}
]
},
"requestId": "0da610fc-9e2a-406a-81ce-b5863111cb1d"
}