機能の概要
このAPIは、OceanBaseクラスタの単一次元または多次元のモニタリングメトリックデータを照会するために使用されます。
呼び出しの説明
インターフェース制約
呼び出し元は、マルチクラウドAPIにアクセスするためのキーを持っている必要があります。AccessKey IDとAccessKey Secretの取得方法の詳細については、アクセスキーの管理をご参照ください。
リクエストパス
POST /api/v2/services/DescribeMetricsData
リクエストパラメータ
Body
名前 |
タイプ |
必須 |
説明 |
例 |
|---|---|---|---|---|
| instanceId | string | はい | OB CloudクラウドデータベースインスタンスID。 | ob317v4uif**** |
| startTime | string | はい | モニタリングデータの開始時間です。この時間はUTC時間のみをサポートし、形式はYYYY-MM-DDThh:mm:ssZです。 | 2021-06-13T15:40:43Z |
| endTime | string | はい | モニタリングデータの終了時間です。この時間はUTC時間のみをサポートし、形式はYYYY-MM-DDThh:mm:ssZです。 | 2021-09-13T15:40:43Z |
| metrics | List |
はい | メトリック名。 | toal_sessions_tenant |
| tenantIdList | List |
いいえ | テナントIDのリスト。 | t4tx6u5tc**** |
| nodeIdList | List |
いいえ | ノードIDのリスト。 | i-0104c6fb57e6e**** |
| labels | string | はい | 一組のKVからなる文字列で、keyとvalueは:で区切られ、KVペアは,で区切られます。例:"app:OB,clusterId:ob*****,tenantId:t******,serverId:*****,zoneId:cn-hangzhou-j"。kは固定フィールドです:
|
app:OB,clusterId:ob*** |
| groupByLabels | string | はい | グループ化に使用するフィールド。複数のフィールドはカンマで区切ります。例:"app,clusterId,tenantId"。 | app,clusterId |
| sortMetricKey | string | いいえ | ソート列。 | tps |
| sortOrder | string | いいえ | ソート規則。
|
DESC |
| limit | string | いいえ | ソート後に返すData配列の長さ。 | 5 |
戻り値
名前 |
タイプ |
説明 |
例 |
|---|---|---|---|
| tenantId | string | テナントID。 | sys |
| data | List | テナントメトリック情報。 | [ {"sql_all_count":16.39, "timestamp":1698217920},{"sql_all_count":16.11,"timestamp":1698214980},{"sql_all_count":16.43,"timestamp":1698216900}],"clusterId":"ob568006pe74kg"}, ...... ] |
例
リクエスト例
curl --digest -u 'AccessKeyID:AccessKeySecret' \
--request POST \
--url https://api-cloud.oceanbase.com/api/v2/services/DescribeMetricsData\
-H 'X-Ob-Project-Id: <プロジェクトID>'
--data \
'{"InstanceId":"obmt5344s5grrpcw","StartTime":"2023-10-24T20:51:40Z","EndTime":"2023-10-25T02:51:40Z","Metrics":"sql_all_rt,sql_delete_rt,sql_insert_rt,sql_other_rt,sql_replace_rt,sql_select_rt,sql_update_rt","Labels":"clusterId:obmt5344s5grrpcw,tenantId:obmt5344s5grrpcw","GroupByLabels":"clusterId,tenantId"}'
説明
- プロジェクトIDはプロジェクトの一意の識別子です。プロジェクト管理を参照して、クラスタのプロジェクトIDを取得できます。
- instanceIdが属するプロジェクトのIDと指定されたプロジェクトIDが一致していることを確認してください。
戻り値の例
JSON形式
{
"Code":200,
"Cost":91,
"Data":[
{
"tenantId":"sys",
"Data":[
{
"sql_all_count":16.39,
"timestamp":1698217920
},
{
"sql_all_count":16.11,
"timestamp":1698214980
},
{
"sql_all_count":16.43,
"timestamp":1698216900
}
],
"clusterId":"ob****06pe74kg"
},
{
"tenantId":"t****h898auo0",
"Data":[
{
"sql_all_count":0.0,
"timestamp":1698217920
},
{
"sql_all_count":0.0,
"timestamp":1698214980
},
{
"sql_all_count":0.0,
"timestamp":1698216900
}
],
"clusterId":"ob****06pe74kg"
}
],
"Deletable":false,
"ErrorCode":"",
"Message":"successful",
"RequestId":"",
"Success":true,
"Trace":"6F95****-2961-4CEB-****-717E22A5****"
}
クラスタ監視メトリクスのサポートリスト
メトリクス名 |
説明 |
単位 |
サポートディメンション |
|---|---|---|---|
| sql_all_count | 1秒間に処理されるSQL文の数 | times/s | ClusterId、ServerId |
| sql_delete_count | 1秒間に処理されるDELETE文の数 | times/s | ClusterId、ServerId |
| sql_insert_count | 1秒間に処理されるINSERT文の数 | times/s | ClusterId、ServerId |
| sql_replace_count | 1秒間に処理されるREPLACE文の数 | times/s | ClusterId、ServerId |
| sql_select_count | 1秒間に処理されるSELECT文の数 | times/s | ClusterId、ServerId |
| sql_update_count | 1秒間に処理されるUPDATE文の数 | times/s | ClusterId、ServerId |
| sql_all_rt | SQL文の平均処理時間 | ms | ClusterId、ServerId |
| sql_delete_rt | DELETE文の平均処理時間 | ms | ClusterId、ServerId |
| sql_insert_rt | INSERT文の平均処理時間 | ms | ClusterId、ServerId |
| sql_other_rt | DDL、DCL、DTLなどその他の文の平均処理時間 | ms | ClusterId、ServerId |
| sql_replace_rt | REPLACE文の平均処理時間 | ms | ClusterId、ServerId |
| sql_select_rt | SELECT文の平均処理時間 | ms | ClusterId、ServerId |
| sql_update_rt | UPDATE文の平均処理時間 | ms | ClusterId、ServerId |
| transaction_commit_count | 1秒間にコミットされるトランザクション数 | times/s | ClusterId、ServerId |
| transaction_count | 1秒間に処理されるトランザクション数 | times/s | ClusterId、ServerId |
| transaction_rollback_count | 1秒間にロールバックされるトランザクション数 | times/s | ClusterId、ServerId |
| transaction_timeout_count | 1秒間にタイムアウトするトランザクション数 | times/s | ClusterId、ServerId |
| transaction_commit_rt | トランザクションの平均コミット時間 | ms | ClusterId、ServerId |
| transaction_rollback_rt | トランザクションの平均ロールバック時間 | ms | ClusterId、ServerId |
| transaction_rt | トランザクションの平均処理時間 | ms | ClusterId、ServerId |
| active_session | 現在のアクティブセッション数 | - | ClusterId、ServerId |
| all_session | 現在のセッション数 | - | ClusterId、ServerId |
| request_queue_time | SQLが待機キューで待機する時間 | μs | ClusterId、ServerId |
| trans_commit_log_count | 1秒間にコミットされるトランザクションログ数 | times/s | ClusterId、ServerId |
| clog_trans_log_total_size | 1秒間にコミットされるトランザクションログサイズ | byte | ClusterId、ServerId |
| io_count | SSStoreの1秒間のI/O回数 | times/s | ClusterId、ServerId |
| io_read_count | SSStoreの1秒間の読み取り回数 | times/s | ClusterId、ServerId |
| io_write_count | SSStoreの1秒間の書き込み回数 | times/s | ClusterId、ServerId |
| io_read_rt | SSStoreの1回の読み取りの平均時間 | μs | ClusterId、ServerId |
| io_rt | I/O時間 | μs | ClusterId、ServerId |
| io_write_rt | SSStoreの1回の書き込みの平均時間 | μs | ClusterId、ServerId |
| io_read_size | SSStoreの1秒間のデータ読み取り量 | byte | ClusterId、ServerId |
| io_size | SSStoreの1秒間のデータ処理量 | byte | ClusterId、ServerId |
| io_write_size | SSStoreの1秒間のデータ書き込み量 | byte | ClusterId、ServerId |
| transaction_multi_partition_count | 1秒間の分散トランザクション数 | times/s | ClusterId、ServerId |
| transaction_partition_count | 1秒間のトランザクション数 | times/s | ClusterId、ServerId |
| transaction_single_partition_count | 1秒間の通常トランザクション数 | times/s | ClusterId、ServerId |
| trans_commit_log_sync_rt | トランザクションログのネットワーク同期の1回あたりの平均時間 | μs | ClusterId、ServerId |
| load1 | 過去1分間のシステム平均負荷 | - | ClusterId、ServerId |
| load15 | 過去15分間のシステム平均負荷 | - | ClusterId、ServerId |
| load5 | 過去5分間のシステム平均負荷 | - | ClusterId、ServerId |
| cpu_percent | CPU利用率 | パーセンテージ(%) | ClusterId、ServerId |
| memory_buffers | カーネルBuffer Cacheサイズ | GiB | ClusterId、ServerId |
| memory_cached | キャッシュ使用メモリ | GiB | ClusterId、ServerId |
| memory_free | 利用可能な物理メモリサイズ | GiB | ClusterId、ServerId |
| memory_used | 使用中の物理メモリサイズ | GiB | ClusterId、ServerId |
| io | 1秒間の平均I/O回数 | times/s | ClusterId、ServerId |
| io_read | 1秒間の読み取り回数 | times/s | ClusterId、ServerId |
| io_write | 1秒間の書き込み回数 | times/s | ClusterId、ServerId |
| io_read_time | 1回のI/O読み取りにかかる平均時間 | ms | ClusterId、ServerId |
| io_time | I/O処理時間 | ms | ClusterId、ServerId |
| io_write_time | 1回のI/O書き込みにかかる平均時間 | ms | ClusterId、ServerId |
| io_byte | 1秒間の平均I/Oデータ量 | MiB | ClusterId、ServerId |
| io_read_byte | 1回の読み取りデータ量 | MiB | ClusterId、ServerId |
| io_write_byte | 1回の書き込みデータ量 | MiB | ClusterId、ServerId |
| net_recv | 1秒間の受信データ量 | MiB | ClusterId、ServerId |
| net_send | 1秒間の送信データ量 | MiB | ClusterId、ServerId |
| net_throughput | ネットワークスループット | MiB | ClusterId、ServerId |
| ntp_offset_milliseconds | NTP時刻のずれ | ms | ClusterId、ServerId |
| ob_data_disk_percent | OBデータディスク使用率 | パーセンテージ(%) | ClusterId、ServerId |
| ob_clog_disk_percent | OBログディスク使用率 | パーセンテージ(%) | ClusterId、ServerId |
| ob_data_disk_used_size | OBデータディスク使用量 | GiB | ClusterId、ServerId |
| ob_process_exists | OBプロセスの生存状態 | - | ClusterId、ServerId |
テナント監視メトリクスのサポートリスト
メトリクス名 |
説明 |
単位 |
サポートされる次元 |
|---|---|---|---|
| sql_all_count | 1秒間に処理されるSQL文の数 | times/s | ClusterId、TenantId、ServerId |
| sql_delete_count | 1秒間に処理されるDELETE文の数 | times/s | ClusterId、TenantId、ServerId |
| sql_insert_count | 1秒間に処理されるINSERT文の数 | times/s | ClusterId、TenantId、ServerId |
| sql_other_count | DDL、DCL、DTLなどその他の文の数 | times/s | ClusterId、TenantId、ServerId |
| sql_replace_count | 1秒間に処理されるREPLACE文の数 | times/s | ClusterId、TenantId、ServerId |
| sql_select_count | 1秒間に処理されるSELECT文の数 | times/s | ClusterId、TenantId、ServerId |
| sql_update_count | 1秒間に処理されるUPDATE文の数 | times/s | ClusterId、TenantId、ServerId |
| sql_all_rt | SQL文の平均処理時間 | ms | ClusterId、TenantId、ServerId |
| sql_delete_rt | DELETE文の平均処理時間 | ms | ClusterId、TenantId、ServerId |
| sql_insert_rt | INSERT文の平均処理時間 | ms | ClusterId、TenantId、ServerId |
| sql_other_rt | DDL、DCL、DTLなどその他の文の平均処理時間 | ms | ClusterId、TenantId、ServerId |
| sql_replace_rt | REPLACE文の平均処理時間 | ms | ClusterId、TenantId、ServerId |
| sql_select_rt | SELECT文の平均処理時間 | ms | ClusterId、TenantId、ServerId |
| sql_update_rt | UPDATE文の平均処理時間 | ms | ClusterId、TenantId、ServerId |
| active_session | 現在のアクティブセッション数 | - | ClusterId、TenantId、ServerId |
| all_session | 現在のセッション数 | - | ClusterId、TenantId、ServerId |
| sql_distributed_count | 1秒間に処理される分散実行計画の数 | times/s | ClusterId、TenantId、ServerId |
| sql_local_count | 1秒間に処理されるローカル実行の数 | times/s | ClusterId、TenantId、ServerId |
| sql_remote_count | 1秒間に処理されるリモート実行計画の数 | times/s | ClusterId、TenantId、ServerId |
| system_event_internal_total_waits | 1秒間の内部待機イベント数 | times/s | ClusterId、TenantId、ServerId |
| system_event_io_total_waits | 1秒間のI/O待機イベント数 | times/s | ClusterId、TenantId、ServerId |
| system_event_latch_total_waits | 1秒間のlatch待機イベント数 | times/s | ClusterId、TenantId、ServerId |
| system_event_other_total_waits | 1秒間のその他の待機イベント数 | times/s | ClusterId、TenantId、ServerId |
| system_event_row_lock_wait_total_waits | ロック待機時間の平均時間 | ms | ClusterId、TenantId、ServerId |
| system_event_sync_rpc_total_waits | 同期RPC待機イベントの平均時間 | ms | ClusterId、TenantId、ServerId |
| wait_event_count | 1秒間の待機イベント数 | times/s | ClusterId、TenantId、ServerId |
| system_event_internal_time_waited | 内部待機イベントの平均時間 | ms | ClusterId、TenantId、ServerId |
| wait_event_rt | 待機イベントの平均時間 | ms | ClusterId、TenantId、ServerId |
| request_dequeue_count | 処理キューから出列するリクエスト数 | times/s | ClusterId、TenantId、ServerId |
| request_enqueue_count | 処理キューに入列するリクエスト数 | times/s | ClusterId、TenantId、ServerId |
| request_queue_time | SQLが待機キューで待機する時間 | μ s | ClusterId、TenantId、ServerId |
| ob_cpu_percent | CPU使用率 | パーセンテージ(%) | ClusterId、TenantId、ServerId |
| memstore_percent | MEMStore使用率 | パーセンテージ(%) | ClusterId、TenantId、ServerId |
| rpc_packet_in_rt | Rpc受信パケットの平均時間 | μs | ClusterId、TenantId、ServerId |
| rpc_packet_out_rt | Rpc送信パケットの平均時間 | μs | ClusterId、TenantId、ServerId |
| rpc_packet_in | Rpc受信パケットスループット | byte | ClusterId、TenantId、ServerId |
| rpc_packet_out | Rpc送信パケットスループット | byte | ClusterId、TenantId、ServerId |
| opened_cursors_count | 開いているカーソル数 | times/s | ClusterId、TenantId、ServerId |
| transaction_commit_count | 1秒間にコミットされるトランザクション数 | times/s | ClusterId、TenantId、ServerId |
| transaction_count | 1秒間に処理されるトランザクション数 | times/s | ClusterId、TenantId、ServerId |
| transaction_rollback_count | 1秒間にロールバックされるトランザクション数 | times/s | ClusterId、TenantId、ServerId |
| transaction_timeout_count | 1秒間にタイムアウトするトランザクション数 | times/s | ClusterId、TenantId、ServerId |
| transaction_commit_rt | トランザクションの平均コミット時間 | ms | ClusterId、TenantId、ServerId |
| transaction_rollback_rt | トランザクションの平均ロールバック時間 | ms | ClusterId、TenantId、ServerId |
| transaction_rt | トランザクションの平均処理時間 | ms | ClusterId、TenantId、ServerId |
| trans_commit_log_count | 1秒間にコミットされるトランザクションログ数 | times/s | ClusterId、TenantId、ServerId |
| clog_trans_log_total_size | 1秒間にコミットされるトランザクションログサイズ | byte | ClusterId、TenantId、ServerId |
| memstore_write_lock_fail_count | 書き込みロック待機失敗回数 | times/s | ClusterId、TenantId、ServerId |
| memstore_write_lock_succ_count | 書き込みロック待機成功回数 | times/s | ClusterId、TenantId、ServerId |
| memstore_write_lock_wait_time | 書き込みロック平均待機時間 | μs | ClusterId、TenantId、ServerId |
| transaction_multi_partition_count | 1秒間の分散トランザクション数 | times/s | ClusterId、TenantId、ServerId |
| transaction_single_partition_count | 1秒間の通常トランザクション数 | times/s | ClusterId、TenantId、ServerId |
| trans_commit_log_sync_rt | 1回のトランザクションログネットワーク同期平均時間 | μs | ClusterId、TenantId、ServerId |
| active_memstore_used | アクティブMEMStoreサイズ | MiB | ClusterId、TenantId、ServerId |
| major_freeze_trigger | メジャーコンパクショントリガーしきい値 | MiB | ClusterId、TenantId、ServerId |
| memstore_limit | MEMStoreの上限 | MiB | ClusterId、TenantId、ServerId |
| total_memstore_used | MEMStore合計サイズ | MiB | ClusterId、TenantId、ServerId |
| io_read_count | SSStore 1秒間読み取り回数 | times/s | ClusterId、TenantId、ServerId |
| io_write_count | SSStore 1秒間書き込み回数 | times/s | ClusterId、TenantId、ServerId |
| io_read_rt | SSStore 1回の読み取り平均時間 | μs | ClusterId、TenantId、ServerId |
| io_write_rt | SSStore 1回の書き込み平均時間 | μs | ClusterId、TenantId、ServerId |
| io_read_size | SSStore 1秒間データ読み取り量 | byte | ClusterId、TenantId、ServerId |
| io_write_size | SSStore 1秒間データ書き込み量 | byte | ClusterId、TenantId、ServerId |
| bloom_filter_cache_size | bloom filterキャッシュサイズ | MiB | ClusterId、TenantId、ServerId |
| clog_cache_size | Clogキャッシュサイズ | MiB | ClusterId、TenantId、ServerId |
| location_cache_size | locationキャッシュサイズ | MiB | ClusterId、TenantId、ServerId |
| plan_cache_size | 実行計画キャッシュサイズ | MiB | ClusterId、TenantId、ServerId |
| row_cache_size | 行キャッシュサイズ | MiB | ClusterId、TenantId、ServerId |
| block_cache_hit_ratio | ブロックキャッシュヒット率 | パーセンテージ(%) | ClusterId、TenantId、ServerId |
| bloom_filter_cache_hit_ratio | bloom filterキャッシュヒット率 | パーセンテージ(%) | ClusterId、TenantId、ServerId |
| clog_cache_hit_ratio | Clogキャッシュヒット率 | パーセンテージ(%) | ClusterId、TenantId、ServerId |
| location_cache_hit_ratio | locationキャッシュヒット率 | パーセンテージ(%) | ClusterId、TenantId、ServerId |
| plan_cache_hit_ratio | 実行計画キャッシュヒット率 | パーセンテージ(%) | ClusterId、TenantId、ServerId |
| row_cache_hit_ratio | 行キャッシュヒット率 | パーセンテージ(%) | ClusterId、TenantId、ServerId |
| block_cache_req_total | ブロックキャッシュリクエスト数 | times/s | ClusterId、TenantId、ServerId |
| bloom_filter_cache_req_total | bloom filterキャッシュリクエスト数 | times/s | ClusterId、TenantId、ServerId |
| clog_cache_req_total | Clogキャッシュリクエスト数 | times/s | ClusterId、TenantId、ServerId |
| location_cache_req_total | locationキャッシュリクエスト数 | times/s | ClusterId、TenantId、ServerId |
| row_cache_req_total | 行キャッシュリクエスト数 | times/s | ClusterId、TenantId、ServerId |
| ob_tenant_binlog_disk_used | binlogログディスク使用量 | GiB | ClusterId、TenantId、ServerId |