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.
今すぐお試しください
テスト
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 |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。