すべてのプロダクト
Search
ドキュメントセンター

Cloud Monitor:PutHybridMonitorMetricData

最終更新日:Jun 11, 2026

PutHybridMonitorMetricData 操作を呼び出して、指定されたモニタリングデータを Enterprise CloudMonitor の指定されたメトリック名前空間にレポートします。

操作説明

Prerequisites

Make sure that you have activated Enterprise CloudMonitor. For more information, see Activate Enterprise CloudMonitor.

Limits

The size of the monitoring data that you can report at a time cannot exceed 1 MB.

Usage notes

This topic provides an example to show how to report the monitoring data of the CPU_Usage metric to the default-aliyun metric namespace of Enterprise CloudMonitor.

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

cms:PutHybridMonitorMetricData

create

*All Resource

*

なし なし

リクエストパラメーター

パラメーター

必須 / 任意

説明

Namespace

string

必須

メトリック名前空間の名前。

メトリック名前空間の名前の取得方法のフォーマットについては、 DescribeHybridMonitorNamespaceList を参照してください。

default-aliyun

MetricList

array<object>

必須

モニタリングデータのリスト。

N の有効な値: 1~100。

array<object>

必須

None.

Name

string

必須

The name of the metric.

Valid values of N: 1 to 100.

Format: The name can contain uppercase letters, lowercase letters, digits, and underscores (_). The name must start with an uppercase letter or a lowercase letter.

CPU_Usage

Labels

array<object>

任意

The list of labels of the metric.

Valid values of N: 1 to 100.

[{"Key":"app","Value":"testApp"},{"Key":"ip","Value":"192.168.XX.XX"},{"Key":"hostName","Value":"host01"}]

object

任意

None.

Key

string

任意

The key of the label of the metric.

Valid values of N: 1 to 100.

Format: The key can contain uppercase letters, lowercase letters, digits, and underscores (). The key must start with an uppercase letter, a lowercase letter, or an underscore ().

説明

Key and Value must be set at the same time.

IP

Value

string

任意

The value of the label of the metric.

Valid values of N: 1 to 100.

説明

Key and Value must be set at the same time.

192.168.XX.XX

Value

string

必須

The value of the metric.

Valid values of N: 1 to 100.

Format: an integer or a floating-point number.

90

TS

integer

任意

The timestamp when the monitoring data was reported.

Valid values of N: 1 to 100.

Unit: milliseconds. Default value: the current time.

1640776119473

共通リクエストパラメーターのフォーマットの詳細については、共通パラメーター を参照してください。

レスポンスフィールド

フィールド

説明

object

None.

Code

string

The status code.

説明

The value 200 indicates that the request was successful.

200

RequestId

string

The request ID.

5DB1CBCA-D14A-55FA-814F-B4DBD9735F68

ErrorDetail

array<object>

The details of the invalid parameters.

If the request parameters that you specify do not meet the requirements, the details of the invalid parameters are displayed.

object

None.

Index

integer

The position of the error information in the array.

0

ErrorMessage

string

The error message that is returned for the invalid parameter.

label name :123 not match [a-zA-Z_][a-zA-Z0-9_]*

成功レスポンス

JSONJSON

{
  "Code": "200",
  "RequestId": "5DB1CBCA-D14A-55FA-814F-B4DBD9735F68",
  "ErrorDetail": [
    {
      "Index": 0,
      "ErrorMessage": "label name :123 not match [a-zA-Z_][a-zA-Z0-9_]*"
    }
  ]
}

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 %s %s
500 InternalError %s
403 %s %s
404 %s %s

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。