OS Monitoringデータ照会
    • PDF

    OS Monitoringデータ照会

    • PDF

    記事の要約

    VPC環境で利用できます。

    説明

    サーバのOS Monitoringデータを照会します。

    リクエスト

    リクエストURL

    POST https://clouddatastreamingservice.apigw.ntruss.com/api/v1/monitoring/getOsMonitoringData/{service-group-instance-no} [KR]
    POST https://clouddatastreamingservice.apigw.ntruss.com/api/sgn-v1/monitoring/getOsMonitoringData/{service-group-instance-no} [SGN]
    POST https://clouddatastreamingservice.apigw.ntruss.com/api/jpn-v1/monitoring/getOsMonitoringData/{service-group-instance-no} [JPN]
    

    リクエストヘッダ

    ヘッダ名説明
    x-ncp-apigw-timestamp1970年1月1日 00:00:00 協定世界時(UTC)からの経過時間をミリ秒(Millisecond)で表し、
    API Gatewayサーバとの時間差が5分以上の場合は無効なリクエストとしてみなす
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyNAVERクラウドプラットフォームのポータルから発行されたAccess Key ID値
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Access Key ID値とSecret Keyで暗号化された署名
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    Content-TypeRequest body content typeをapplication/jsonに指定
    Content-Type: application/json

    リクエストパラメータ

    パラメータタイプ必須有無説明
    serviceGroupInstanceNoStringY照会するクラスタの番号です。
    timeStartLongY照会開始時間(Millisecond)
    timeEndLongY照会終了時間(Millisecond)
    metricStringY照会するMetric名
    computeInstanceNoStringY照会するサーバのCompute Instance No
    intervalStringN集計サイクル(default: Min1)
    • OS Metric
    MetricDescription
    OS_ALL_METRICSOSすべてのMetric
    • Interval
    MetricDescription
    Min11分おきに照会(最大1日)
    Min55分おきに照会(最大1週間)
    Min3030分おきに照会(最大1ヶ月)
    Hour22時間おきに照会(最大3ヶ月)
    Day11日おきに照会(最大1年)

    リクエスト例

    POST https://clouddatastreamingservice.apigw.ntruss.com/api/v1/monitoring/getOsMonitoringData/1773271
    HOST: clouddatastreamingservice.apigw.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.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;
    }
    

    フィールド

    パラメータ名タイプ説明
    dataListMonitoringデータの情報
    dpsList<ArrayList>モニタリング情報(timestamp、データ形式)
    aggregationString照会するデータの集計関数
    dimensionsDimensionsVo照会するデータの区切り文字
    intervalString照会するデータの集計サイクル
    metricString照会するMetric名
    graphNameStringグラフ名
    productNameString商品名
    instanceNoString照会するサーバの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"
    }
    

    この記事は役に立ちましたか?

    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.