Description
You can call this operation to generate a performance report of a specified cluster.
Call description
Prerequisite
You have the read and write permissions on the specified cluster.
Request path
post /api/v2/ob/clusters/{id}/performance/workload/reports
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Integer | Yes | 1 | The ID of the cluster for which you want to generate a performance report. |
| startSnapshotId | Long | Yes | 123 | The ID of the start snapshot for the report. |
| endSnapshotId | Long | Yes | 125 | The ID of the end snapshot for the report. |
| name | String | Yes | report_name | The name of the report. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | |
| ├─ id | Long | The unique ID of the report. |
| ├─ clusterName | String | The name of the cluster to which the report belongs. |
| ├─ obClusterId | Long | The ID of the cluster to which the report belongs. |
| ├─ clusterId | Long | The cluster ID recorded in OceanBase Cloud Platform (OCP). |
| ├─ name | String | The name of the report. |
| ├─ beginReportTime | String | The start time of the report. |
| ├─ endReportTime | String | The end time of the report. |
| ├─ generateTime | String | The time when the report was generated. |
| ├─ status | String | The status of the report. Valid values: CREATING, SUCCESSFUL, and FAILED. |
| ├─ taskInstanceId | Long | The ID of the associated task instance. |
| ├─ scope | String | The scope of the report, including the cluster level and tenant level. Currently, only cluster-level reports are supported. |
| ├─ creator | String | The operator. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Examples
Sample request
post /api/v2/ob/clusters/1/performance/workload/reports
Sample response
{
"data": {
"beginReportTime": "2023-01-12T06:01:00.026Z",
"clusterId": 4,
"clusterName": "odc_meta1",
"creator": "admin",
"endReportTime": "2023-01-12T08:01:00.935Z",
"generateTime": "2023-01-12T19:44:41.725+08:00",
"id": 16,
"name": "OBAWR_odc_meta1_100005_202301121401_202301121601",
"obClusterId": 100005,
"scope": "CLUSTER",
"status": "CREATING",
"taskInstanceId": 2423941
},
"duration": 27,
"server": "xxx.xxx.xxx.xxx",
"status": 200,
"successful": true,
"timestamp": "2023-01-12T19:44:41.739+08:00",
"traceId": "547b73e3e435415a"
}