PutCustomMetric 操作を呼び出して、カスタム監視のモニタリングデータをレポートします。
操作説明
We recommend that you use the PutHybridMonitorMetricData operation in Enterprise CloudMonitor.
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
cms:PutCustomMetric |
create |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| MetricList |
array<object> |
必須 |
モニタリングデータのリスト。 |
|
|
object |
任意 |
|||
| Type |
string |
必須 |
The type of the reported value. Valid values of N: 1 to 21. Valid values:
説明
When you report aggregate data, we recommend that you report both data with a period of 60 seconds and data with a period of 300 seconds. Otherwise, monitoring data cannot be queried for a time span of more than 7 days. |
0 |
| MetricName |
string |
必須 |
The name of the metric. Valid values of N: 1 to 21. For more information, see Metrics of cloud services. |
cpu_total |
| Time |
string |
任意 |
The time when the metric occurred. Valid values of N: 1 to 21. The following two types of values are supported:
|
1508136760000 |
| GroupId |
string |
必須 |
The ID of the application group. Valid values of N: 1 to 21. 説明
If the metric does not belong to any application group, enter 0. |
12345 |
| Values |
string |
必須 |
The collection of metric values. Valid values of N: 1 to 21. 説明
If the type of the reported value is 0, the raw values are reported. CloudMonitor aggregates raw values into multiple values, such as maximum, count, and sum, by period. |
{"value":10.5} |
| Dimensions |
string |
必須 |
The dimension map, which is used to query monitoring data of a specified resource. Valid values of N: 1 to 21. Format: a collection of key-value pairs. A commonly used key-value pair collection is: The length of Key and Value is 1 to 64 characters. Characters beyond the first 64 are truncated. The values of Key and Value can contain letters, digits, periods (.), hyphens (-), underscores (_), forward slashes (/), and backslashes (). 説明
Dimensions must be passed in as a JSON string that represents the map object, and must be passed in order. |
{"sampleName1":"value1","sampleName2":"value2"} |
| Period |
string |
任意 |
The aggregation period. Valid values of N: 1 to 21. Unit: seconds. Valid values: 60 and 300. 説明
If the type of the reported value is 1, you must set this parameter. |
60 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| Code |
string |
The status code. 説明
200 indicates success. |
200 |
| Message |
string |
The error message. |
The request has failed due to a temporary failure of the server. |
| RequestId |
string |
The request ID. |
05B36C2C-5F6E-48D5-8B41-CE36DD7EE8E0 |
例
成功レスポンス
JSONJSON
{
"Code": "200",
"Message": "The request has failed due to a temporary failure of the server.",
"RequestId": "05B36C2C-5F6E-48D5-8B41-CE36DD7EE8E0"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | %s | %s | |
| 500 | %s | %s | |
| 500 | InternalError | %s | |
| 403 | %s | %s | |
| 404 | %s | %s |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。